diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:20:48 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:20:48 +0000 |
| commit | ea942507b10d5b808801dd58d777ea4e02997931 (patch) | |
| tree | 7ea42cf427bda317125421123460445eb3c7075f /contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp | |
| parent | 4d0b32cd7f47f4836ea0a7a9da24d3576c6e2fe0 (diff) | |
| parent | 97b17066aaac3f1590a809d79abe98fde03821ec (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp')
| -rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp b/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp index 82297e7ee417..7032d00386f3 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp @@ -249,6 +249,13 @@ static TargetLibraryInfoImpl *createTLII(llvm::Triple &TargetTriple, TargetLibraryInfoImpl *TLII = new TargetLibraryInfoImpl(TargetTriple); if (!CodeGenOpts.SimplifyLibCalls) TLII->disableAllFunctions(); + else { + // Disable individual libc/libm calls in TargetLibraryInfo. + LibFunc::Func F; + for (auto &FuncName : CodeGenOpts.getNoBuiltinFuncs()) + if (TLII->getLibFunc(FuncName, F)) + TLII->setUnavailable(F); + } switch (CodeGenOpts.getVecLib()) { case CodeGenOptions::Accelerate: |
