diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-16 04:12:04 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-05-16 04:12:04 +0000 |
| commit | eb351eb84945c64212b5e8582c09394542a7cc69 (patch) | |
| tree | 32d7a03e84bc7169ebdb69635efe75c300a006b1 /lib/Analysis | |
| parent | 0225d5a3aff17fe6e747821973aa4dc0b8f6d6a9 (diff) | |
| download | external_llvm-eb351eb84945c64212b5e8582c09394542a7cc69.zip external_llvm-eb351eb84945c64212b5e8582c09394542a7cc69.tar.gz external_llvm-eb351eb84945c64212b5e8582c09394542a7cc69.tar.bz2 | |
Respect the 'nobuiltin' attribute when determining if a call is to a memory builtin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
| -rw-r--r-- | lib/Analysis/MemoryBuiltins.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Analysis/MemoryBuiltins.cpp b/lib/Analysis/MemoryBuiltins.cpp index 9c0d8ac..1660347 100644 --- a/lib/Analysis/MemoryBuiltins.cpp +++ b/lib/Analysis/MemoryBuiltins.cpp @@ -77,6 +77,9 @@ static Function *getCalledFunction(const Value *V, bool LookThroughBitCast) { if (!CS.getInstruction()) return 0; + if (CS.hasFnAttr(Attribute::NoBuiltin)) + return 0; + Function *Callee = CS.getCalledFunction(); if (!Callee || !Callee->isDeclaration()) return 0; |
