[llvm-commits] [llvm] r99697 - /llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Bill Wendling
isanbard at gmail.com
Fri Mar 26 18:24:30 PDT 2010
Author: void
Date: Fri Mar 26 20:24:30 2010
New Revision: 99697
URL: http://llvm.org/viewvc/llvm-project?rev=99697&view=rev
Log:
Forgot the part where we handle the ".llvm.eh.catch.all.value".
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp?rev=99697&r1=99696&r2=99697&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Fri Mar 26 20:24:30 2010
@@ -281,8 +281,17 @@
GlobalVariable *llvm::ExtractTypeInfo(Value *V) {
V = V->stripPointerCasts();
GlobalVariable *GV = dyn_cast<GlobalVariable>(V);
- assert ((GV || isa<ConstantPointerNull>(V)) &&
- "TypeInfo must be a global variable or NULL");
+
+ if (GV && GV->getName() == ".llvm.eh.catch.all.value") {
+ assert(GV->hasInitializer() &&
+ "The EH catch-all value must have an initializer");
+ Value *Init = GV->getInitializer();
+ GV = dyn_cast<GlobalVariable>(Init);
+ if (!GV) V = cast<ConstantPointerNull>(Init);
+ }
+
+ assert((GV || isa<ConstantPointerNull>(V)) &&
+ "TypeInfo must be a global variable or NULL");
return GV;
}
More information about the llvm-commits
mailing list