diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2003-07-30 21:45:20 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2003-07-30 21:45:20 +0000 |
commit | 3b624625e7928b1d7b9c118d19f19ab678b5c698 (patch) | |
tree | fa1e1359f2197df1819e19cf8019aa27b46bb9a8 /tools/bugpoint/CodeGeneratorBug.cpp | |
parent | 942e7230e5cc83b4256dbd682d72f2f63f8f9409 (diff) |
Ignore intrinsic functions -- don't mangle their names or rewrite calls to them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/CodeGeneratorBug.cpp')
-rw-r--r-- | tools/bugpoint/CodeGeneratorBug.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/bugpoint/CodeGeneratorBug.cpp b/tools/bugpoint/CodeGeneratorBug.cpp index abd940b34b..02ef5e3459 100644 --- a/tools/bugpoint/CodeGeneratorBug.cpp +++ b/tools/bugpoint/CodeGeneratorBug.cpp @@ -113,7 +113,8 @@ bool ReduceMisCodegenFunctions::TestFuncs(const std::vector<Function*> &Funcs, // Use the function we just added to get addresses of functions we need // Iterate over the global declarations in the Safe module for (Module::iterator F=SafeModule->begin(),E=SafeModule->end(); F!=E; ++F){ - if (F->isExternal() && !F->use_empty() && &(*F) != resolverFunc) { + if (F->isExternal() && !F->use_empty() && &(*F) != resolverFunc && + F->getIntrinsicID() == 0 /* ignore intrinsics */) { // If it has a non-zero use list, // 1. Add a string constant with its name to the global file // The correct type is `const [ NUM x sbyte ]' where NUM is length of @@ -257,6 +258,10 @@ namespace { if (externalOnly && !V.isExternal()) return; // If we're already processed this symbol, don't add it again if (Symbols.count(&V) != 0) return; + // Ignore intrinsic functions + if (Function *F = dyn_cast<Function>(&V)) + if (F->getIntrinsicID() != 0) + return; std::string SymName = V.getName(); |