Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: lib/Transforms/NaCl/ExpandVarArgs.cpp

Issue 1692803002: Remove Emscripten support (Closed) Base URL: https://chromium.googlesource.com/a/native_client/pnacl-llvm.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Transforms/NaCl/ExpandInsertExtractElement.cpp ('k') | lib/Transforms/NaCl/LowerEmAsyncify.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Transforms/NaCl/ExpandVarArgs.cpp
diff --git a/lib/Transforms/NaCl/ExpandVarArgs.cpp b/lib/Transforms/NaCl/ExpandVarArgs.cpp
index 6e2824684d80a8922ebf1efcb35e7ab6f6ba0c9c..3e4c25a112d716ee191357a12c04e50f69a0609c 100644
--- a/lib/Transforms/NaCl/ExpandVarArgs.cpp
+++ b/lib/Transforms/NaCl/ExpandVarArgs.cpp
@@ -46,22 +46,7 @@ INITIALIZE_PASS(ExpandVarArgs, "expand-varargs",
"Expand out variable argument function definitions and calls",
false, false)
-static bool isEmscriptenJSArgsFunc(Module *M, StringRef Name) {
- // TODO(jfb) Make these intrinsics in clang and remove the assert: these
- // intrinsics should only exist for Emscripten.
- bool isEmscriptenSpecial = Name.equals("emscripten_asm_const_int") ||
- Name.equals("emscripten_asm_const_double") ||
- Name.equals("emscripten_landingpad") ||
- Name.equals("emscripten_resume");
- assert(isEmscriptenSpecial ? Triple(M->getTargetTriple()).isOSEmscripten()
- : true);
- return isEmscriptenSpecial;
-}
-
static bool ExpandVarArgFunc(Module *M, Function *Func) {
- if (isEmscriptenJSArgsFunc(M, Func->getName()))
- return false;
-
Type *PtrType = Type::getInt8PtrTy(Func->getContext());
FunctionType *FTy = Func->getFunctionType();
@@ -169,9 +154,6 @@ static bool ExpandVarArgCall(Module *M, InstType *Call, DataLayout *DL) {
Call->getCalledValue()->getType()->getPointerElementType());
if (!FuncType->isFunctionVarArg())
return false;
- if (auto *F = dyn_cast<Function>(Call->getCalledValue()))
- if (isEmscriptenJSArgsFunc(M, F->getName()))
- return false;
Function *F = Call->getParent()->getParent();
LLVMContext &Ctx = M->getContext();
« no previous file with comments | « lib/Transforms/NaCl/ExpandInsertExtractElement.cpp ('k') | lib/Transforms/NaCl/LowerEmAsyncify.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698