aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-07 17:35:43 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-03-07 17:35:43 -0800
commit06b7ce14ded3d39a8e4703d22b360fa782c1522a (patch)
tree1d1ce995c502305e58f2ef59bd648dfef7f2e67d /lib/Transforms
parent68081ee62375a1d900d46f969e38330f14fb8775 (diff)
fix the case where exceptions are lowered and we already had getHigh/preInvoke/postInvoke defined in the module
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/NaCl/LowerEmExceptionsPass.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/NaCl/LowerEmExceptionsPass.cpp b/lib/Transforms/NaCl/LowerEmExceptionsPass.cpp
index ac07530ab8..3f6f18274f 100644
--- a/lib/Transforms/NaCl/LowerEmExceptionsPass.cpp
+++ b/lib/Transforms/NaCl/LowerEmExceptionsPass.cpp
@@ -99,19 +99,19 @@ bool LowerEmExceptions::runOnModule(Module &M) {
Type *i8P = i8->getPointerTo();
Type *Void = Type::getVoidTy(M.getContext());
- if (!TheModule->getFunction("getHigh32")) {
+ if (!(GetHigh = TheModule->getFunction("getHigh32"))) {
FunctionType *GetHighFunc = FunctionType::get(i32, false);
GetHigh = Function::Create(GetHighFunc, GlobalValue::ExternalLinkage,
"getHigh32", TheModule);
}
- FunctionType *VoidFunc = FunctionType::get(Void, false);
- if (!TheModule->getFunction("emscripten_preinvoke")) {
+ if (!(PreInvoke = TheModule->getFunction("emscripten_preinvoke"))) {
+ FunctionType *VoidFunc = FunctionType::get(Void, false);
PreInvoke = Function::Create(VoidFunc, GlobalValue::ExternalLinkage, "emscripten_preinvoke", TheModule);
}
- FunctionType *IntFunc = FunctionType::get(i32, false);
- if (!TheModule->getFunction("emscripten_postinvoke")) {
+ if (!(PostInvoke = TheModule->getFunction("emscripten_postinvoke"))) {
+ FunctionType *IntFunc = FunctionType::get(i32, false);
PostInvoke = Function::Create(IntFunc, GlobalValue::ExternalLinkage, "emscripten_postinvoke", TheModule);
}