From: Rafael Espindola Date: Fri, 4 Jul 2014 15:58:00 +0000 (+0000) Subject: Mark intrinsic functions as llvm-specific. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3885090b8613d611a2d223200110a5dc19a2dd51;p=platform%2Fupstream%2Fllvm.git Mark intrinsic functions as llvm-specific. llvm-svn: 212347 --- diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp index d0191081..0639c71 100644 --- a/llvm/lib/Object/IRObjectFile.cpp +++ b/llvm/lib/Object/IRObjectFile.cpp @@ -245,6 +245,11 @@ uint32_t IRObjectFile::getSymbolFlags(DataRefImpl Symb) const { Res |= BasicSymbolRef::SF_FormatSpecific; } + if (auto *F = dyn_cast(GV)) { + if (F->getName().startswith("llvm.")) + Res |= BasicSymbolRef::SF_FormatSpecific; + } + return Res; } diff --git a/llvm/test/Object/mangle-ir.ll b/llvm/test/Object/mangle-ir.ll index 725d788..5b3cd09 100644 --- a/llvm/test/Object/mangle-ir.ll +++ b/llvm/test/Object/mangle-ir.ll @@ -2,7 +2,13 @@ target datalayout = "m:o" +; CHECK-NOT: memcpy ; CHECK: T _f +; CHECK-NOT: memcpy + define void @f() { + tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* null, i8* null, i64 0, i32 1, i1 false) ret void } + +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1)