summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-11-05 18:16:03 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-11-05 18:16:03 +0000
commitc5754a65e64126743644aec2631f165a0ac3ffe4 (patch)
treeb35cb05d283e1a11cf2012f2ff4b44116725a2cd /llvm/lib/Transforms/Instrumentation/DebugIR.cpp
parent8f093f4138e1ffafb7ee5344e012ba8dd952a055 (diff)
downloadbcm5719-llvm-c5754a65e64126743644aec2631f165a0ac3ffe4.tar.gz
bcm5719-llvm-c5754a65e64126743644aec2631f165a0ac3ffe4.zip
IR: MDNode => Value: NamedMDNode::getOperator()
Change `NamedMDNode::getOperator()` from returning `MDNode *` to returning `Value *`. To reduce boilerplate at some call sites, add a `getOperatorAsMDNode()` for named metadata that's expected to only return `MDNode` -- for now, that's everything, but debug node named metadata (such as llvm.dbg.cu and llvm.dbg.sp) will soon change. This is part of PR21433. Note that there's a follow-up patch to clang for the API change. llvm-svn: 221375
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/DebugIR.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/DebugIR.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
index 5234341b32e..7a0ed81eed6 100644
--- a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
@@ -474,7 +474,7 @@ bool getSourceInfoFromDI(const Module &M, std::string &Directory,
if (!CUNode || CUNode->getNumOperands() == 0)
return false;
- DICompileUnit CU(CUNode->getOperand(0));
+ DICompileUnit CU(cast<MDNode>(CUNode->getOperand(0)));
if (!CU.Verify())
return false;
OpenPOWER on IntegriCloud