Commit Graph

8 Commits

Author SHA1 Message Date
Guillaume Chatelet 0508c994f0 [clang] Turn -fno-builtin flag into an IR Attribute
Summary:
This is a follow up on https://reviews.llvm.org/D61634#1742154 to turn the clang driver -fno-builtin flag into an IR attribute.
I also investigated pushing the attribute earlier on (in Sema) but it looks like this patch is simple and will cover all function calls.

Reviewers: aaron.ballman, courbet

Subscribers: cfe-commits, tejohnson

Tags: #clang

Differential Revision: https://reviews.llvm.org/D71193
2019-12-12 17:21:12 +01:00
Eric Christopher 5b91350b4a Add fopen to the list of builtins that we check and whitelist.
llvm-svn: 333594
2018-05-30 21:11:45 +00:00
Eric Christopher 85f0e505e7 Add Builtins.def support for fread and fwrite to ensure that -fno-builtin-
works with them and test accordingly.

llvm-svn: 333156
2018-05-24 06:09:28 +00:00
Eric Christopher c27ad9bbc8 Migrate libcalls-fno-builtin.c test from checking optimized assembly
to checking for attributes on the call site - and fix up builtin
functions that we were testing for but not ensuring wouldn't be
optimized by the backend.

Leave one set of asm tests to make sure that we're also communicating
builtin-ness to TLI.

llvm-svn: 333154
2018-05-24 06:00:50 +00:00
Chad Rosier 7dbc9cf876 [Driver] Add support for -fno-builtin-foo options.
Addresses PR4941 and rdar://6756912.
http://reviews.llvm.org/D15195

llvm-svn: 256937
2016-01-06 14:35:46 +00:00
Meador Inge 2461d8a6d5 Add a few more test cases for verifying -fno-builtin.
Some holes in testing where discovered while working on the LLVM library
call simplifiers.

llvm-svn: 167661
2012-11-10 03:56:55 +00:00
Chad Rosier ff3f99bf0a I referenced the incorrect rdar in my previous commit (r151745). Add the
correct radar number to the test case for tracking purposes.
rdar://10551066

llvm-svn: 151746
2012-02-29 20:18:57 +00:00
Chad Rosier b1cfc6864f Allocate TargetLibraryInfo for the CodeGen passes. Otherwise, it's instantiated
by the BAA pass, which uses the default TargetLibraryInfo constructor.
Unfortunately, the default TargetLibraryInfo constructor assumes all library
calls are available and thus ignores -fno-builtin.
rdar://10947759

llvm-svn: 151745
2012-02-29 20:14:59 +00:00