Implement the NoBuiltin attribute.
[oota-llvm.git] / lib / Transforms / Scalar / SimplifyLibCalls.cpp
index d5cefa35a0c376afb5b9ea5be80e023e77d17493..916b37d4a8baa1526de862af119efdcb28ed7e26 100644 (file)
@@ -165,7 +165,7 @@ bool SimplifyLibCalls::runOnFunction(Function &F) {
     for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) {
       // Ignore non-calls.
       CallInst *CI = dyn_cast<CallInst>(I++);
-      if (!CI) continue;
+      if (!CI || CI->hasFnAttr(Attribute::NoBuiltin)) continue;
 
       // Ignore indirect calls and calls to non-external functions.
       Function *Callee = CI->getCalledFunction();