summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/IR/DebugLoc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/llvm/lib/IR/DebugLoc.cpp')
-rw-r--r--gnu/llvm/lib/IR/DebugLoc.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/gnu/llvm/lib/IR/DebugLoc.cpp b/gnu/llvm/lib/IR/DebugLoc.cpp
index 36f3e179a2c..10ec98ac7e6 100644
--- a/gnu/llvm/lib/IR/DebugLoc.cpp
+++ b/gnu/llvm/lib/IR/DebugLoc.cpp
@@ -56,15 +56,28 @@ DebugLoc DebugLoc::getFnDebugLoc() const {
return DebugLoc();
}
+bool DebugLoc::isImplicitCode() const {
+ if (DILocation *Loc = get()) {
+ return Loc->isImplicitCode();
+ }
+ return true;
+}
+
+void DebugLoc::setImplicitCode(bool ImplicitCode) {
+ if (DILocation *Loc = get()) {
+ Loc->setImplicitCode(ImplicitCode);
+ }
+}
+
DebugLoc DebugLoc::get(unsigned Line, unsigned Col, const MDNode *Scope,
- const MDNode *InlinedAt) {
+ const MDNode *InlinedAt, bool ImplicitCode) {
// If no scope is available, this is an unknown location.
if (!Scope)
return DebugLoc();
return DILocation::get(Scope->getContext(), Line, Col,
const_cast<MDNode *>(Scope),
- const_cast<MDNode *>(InlinedAt));
+ const_cast<MDNode *>(InlinedAt), ImplicitCode);
}
DebugLoc DebugLoc::appendInlinedAt(DebugLoc DL, DILocation *InlinedAt,