Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.

llvm-svn: 92726
This commit is contained in:
Benjamin Kramer
2010-01-05 13:12:22 +00:00
parent f22afe32f9
commit ccce8bae14
25 changed files with 46 additions and 58 deletions

View File

@@ -593,7 +593,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
// this should be rewritten as a `ret'
// Check if the function should return a value
if (OldFnRetTy == Type::getVoidTy(Context)) {
if (OldFnRetTy->isVoidTy()) {
ReturnInst::Create(Context, 0, TheSwitch); // Return void
} else if (OldFnRetTy == TheSwitch->getCondition()->getType()) {
// return what we have