There are two ways to map a variable to its lexical scope. Lexical scope information...
[oota-llvm.git] / lib / Analysis / DebugInfo.cpp
index 4dcf04ef2163875c1d48ed9abf41044a08dd7fa5..dd85a4fcc80cad8337b1b93539ffbdb599e63b04 100644 (file)
@@ -116,6 +116,12 @@ unsigned DIVariable::getNumAddrElements() const {
   return DbgNode->getNumOperands()-8;
 }
 
+/// getInlinedAt - If this variable is inlined then return inline location.
+MDNode *DIVariable::getInlinedAt() {
+  if (getVersion() <= llvm::LLVMDebugVersion9)
+    return NULL;
+  return dyn_cast_or_null<MDNode>(DbgNode->getOperand(7));
+}
 
 //===----------------------------------------------------------------------===//
 // Predicates