summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-22 14:58:02 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-22 14:58:02 +0000
commit74f2e46eeff9e5ad001259a74c56a1b4d71776e3 (patch)
tree38def27a52541cec8867c80bb19097342a5d1911 /llvm/lib/CodeGen/MachineModuleInfo.cpp
parentda466db02ad02b818dbbeeb6349330ca7b4a9514 (diff)
downloadbcm5719-llvm-74f2e46eeff9e5ad001259a74c56a1b4d71776e3.tar.gz
bcm5719-llvm-74f2e46eeff9e5ad001259a74c56a1b4d71776e3.zip
Clarify that llvm.used can contain aliases.
Also add a check for llvm.used in the verifier and simplify clients now that they can assume they have a ConstantArray. llvm-svn: 180019
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index 0ea9ae0fcc8..8af9d053b12 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -326,8 +326,7 @@ void MachineModuleInfo::AnalyzeModule(const Module &M) {
if (!GV || !GV->hasInitializer()) return;
// Should be an array of 'i8*'.
- const ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
- if (InitList == 0) return;
+ const ConstantArray *InitList = cast<ConstantArray>(GV->getInitializer());
for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i)
if (const Function *F =
OpenPOWER on IntegriCloud