Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit fb8da68

Browse files
committed
Merge branch 'remove-vararg-localmod' of https://github.com/jfbastien/emscripten-fastcomp into incoming
2 parents e0a4786 + 18b41a4 commit fb8da68

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/Transforms/NaCl/ExpandVarArgs.cpp

+2-8
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,8 @@ static bool ExpandVarArgCall(Module *M, InstType *Call, DataLayout *DL) {
256256
ArgTypes.push_back(VarArgsTy->getPointerTo());
257257
FunctionType *NFTy = FunctionType::get(FuncType->getReturnType(), ArgTypes,
258258
/*isVarArg=*/false);
259-
/// XXX EMSCRIPTEN: Handle Constants as well as Instructions, since we
260-
/// don't run the ConstantExpr lowering pass.
261-
Value *CastFunc;
262-
if (Constant *C = dyn_cast<Constant>(Call->getCalledValue()))
263-
CastFunc = ConstantExpr::getBitCast(C, NFTy->getPointerTo());
264-
else
265-
CastFunc = IRB.CreateBitCast(Call->getCalledValue(),
266-
NFTy->getPointerTo(), "vararg_func");
259+
Value *CastFunc = IRB.CreateBitCast(Call->getCalledValue(),
260+
NFTy->getPointerTo(), "vararg_func");
267261

268262
// Create the converted function call.
269263
FixedArgs.push_back(Buf);

0 commit comments

Comments
 (0)