summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Avoid white spaces in file names. NFCEric Liu2017-07-101-1/+2
| | | | | | | | | | | | Summary: White spaces in file names are causing Phabricator/SVN to crash. Reviewers: bkramer Subscribers: bogner, cfe-commits Differential Revision: https://reviews.llvm.org/D35203 llvm-svn: 307551
* X86 Intrinsics: _bit_scan_forward should not be under #ifdef __RDRND__Zvi Rackover2017-07-102-9/+12
| | | | | | | | | | | | | | | | | | | | Summary: The _bit_scan_forward and _bit_scan_reverse intrinsics were accidentally masked under the preprocessor checks that prune intrinsics definitions for the benefit of faster compile-time on Windows. This patch moves the definitons out of that region. Fixes pr33722 Reviewers: craig.topper, aaboud, thakis Reviewed By: craig.topper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D35184 llvm-svn: 307524
* Remove incorrect FIXME comment; the FIXME was addressed before the changes ↵Eric Fiselier2017-07-101-2/+0
| | | | | | were committed llvm-svn: 307515
* Remove non-ascii characters introduced in r307513Eric Fiselier2017-07-101-4/+4
| | | | llvm-svn: 307514
* [coroutines] Include the implicit object parameter type when looking up ↵Eric Fiselier2017-07-102-19/+300
| | | | | | | | | coroutine_traits for member functions. This patch was originally from Toby Allsopp, but I hijacked it and fixed it up with his permission. llvm-svn: 307513
* [analyzer] Faster hashing of subsequences in CompoundStmts.Raphael Isemann2017-07-091-9/+20
| | | | | | | | | | | | | | Summary: This patches improves the hashing subsequences in CompoundStmts by incrementally hashing all subsequences with the same starting position. This results in a reduction of the time for this constraint while running over SQLite from 1.10 seconds to 0.55 seconds (-50%). Reviewers: NoQ Reviewed By: NoQ Subscribers: cfe-commits, xazax.hun, v.g.vassilev Differential Revision: https://reviews.llvm.org/D34364 llvm-svn: 307509
* [X86] Add more feature flag bit defines to cpuid.h for gcc compatibility.Craig Topper2017-07-091-3/+61
| | | | llvm-svn: 307507
* [X86] Add __get_cpuid_count to cpuid.h. Update __get_cpuid to check the ↵Craig Topper2017-07-091-17/+37
| | | | | | | | maximum level support before accessing the leaf. Rename level to leaf everywhere. This matches gcc behavior. llvm-svn: 307506
* [analyzer] Make StmtDataCollector part of the CloneDetection APIRaphael Isemann2017-07-092-185/+191
| | | | | | | | | | | | | | Summary: We probably want to use this useful templates in other pieces of code (e.g. the one from D34329), so we should make this public. Reviewers: NoQ Reviewed By: NoQ Subscribers: cfe-commits, xazax.hun, v.g.vassilev, johannes Differential Revision: https://reviews.llvm.org/D34880 llvm-svn: 307501
* Fix build failure with gcc about mixing enum and non-enumYaxun Liu2017-07-082-3/+6
| | | | llvm-svn: 307483
* [Bash-autocompletion] Auto complete cc1 options if -cc1 is specifiedYuka Takahashi2017-07-083-7/+24
| | | | | | | | | | | | | | Summary: We don't want to autocomplete flags whose Flags class has `NoDriverOption` when argv[1] is not `-cc1`. Another idea for this implementation is to make --autocomplete a cc1 option and handle it in clang Frontend, by porting --autocomplete handler from Driver to Frontend, so that we can handle Driver options and CC1 options in unified manner. Differential Revision: https://reviews.llvm.org/D34770 llvm-svn: 307479
* [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properlyYuka Takahashi2017-07-081-0/+6
| | | | | | | | Summary: Fixed a bug that -foo=bar wasn't handled properly on old version of bash. Differential Revision: https://reviews.llvm.org/D34927 llvm-svn: 307478
* [CodeGen] Fold variable into assert.Benjamin Kramer2017-07-081-2/+2
| | | | | | Avoids warnings in Release builds. llvm-svn: 307472
* CodeGen: Fix address space of global variableYaxun Liu2017-07-0813-145/+279
| | | | | | | | | | | | | Certain targets (e.g. amdgcn) require global variable to stay in global or constant address space. In C or C++ global variables are emitted in the default (generic) address space. This patch introduces virtual functions TargetCodeGenInfo::getGlobalVarAddressSpace and TargetInfo::getConstantAddressSpace to handle this in a general approach. It only affects IR generated for amdgcn target. Differential Revision: https://reviews.llvm.org/D33842 llvm-svn: 307470
* [analyzer] Fix a path in the developer manualGabor Horvath2017-07-081-2/+2
| | | | | | Patch by: Reka Nikolett Kovacs llvm-svn: 307468
* [ODRHash] Support FriendDeclRichard Trieu2017-07-084-4/+159
| | | | llvm-svn: 307458
* [X86] Move AVX512VPOPCNTDQ in __builtin_cpu_support's enum to match trunk gcc.Craig Topper2017-07-081-0/+2
| | | | | | | | There are two other features before it that we don't currently support in the the frontend or backend so I left placeholders to keep the encoding correct. I think the compiler-rt implementation of this feature is even further out of date. llvm-svn: 307456
* Fix warnings introduced by r307434.Richard Smith2017-07-082-1/+5
| | | | llvm-svn: 307455
* Revert r307445 as it breaks on certain platforms.Dehao Chen2017-07-072-39/+6
| | | | llvm-svn: 307449
* [MS] Don't statically initialize dllimport member function pointersReid Kleckner2017-07-073-40/+63
| | | | | | | | | | | | | | | | | | | | Summary: r306137 made dllimport pointers to member functions non-constant. This is correct because a load must be executed to resolve any dllimported data. However, r306137 did not account for the use of dllimport member function pointers used as template arguments. This change re-lands r306137 with a template instantiation fix. This fixes PR33570. Reviewers: rnk, majnemer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34714 llvm-svn: 307446
* Add sample PGO integration test to cover profile annotation and inlining.Dehao Chen2017-07-072-6/+39
| | | | | | | | | | | | | | Summary: The patch makes the integration test cover major sample PGO components. Reviewers: davidxl Reviewed By: davidxl Subscribers: sanjoy, cfe-commits Differential Revision: https://reviews.llvm.org/D34725 llvm-svn: 307445
* Add testcase for r305850.Lang Hames2017-07-072-0/+16
| | | | | | Accidentally left this out of the original commit. llvm-svn: 307444
* Enable the new PM + SamlePGO + ThinLTO testing.Dehao Chen2017-07-071-3/+1
| | | | | | | | | | | | | | Summary: This patch should be enabled after https://reviews.llvm.org/D34895 Reviewers: chandlerc, tejohnson, davidxl Reviewed By: tejohnson Subscribers: sanjoy, mehdi_amini, inglorion, eraman, cfe-commits Differential Revision: https://reviews.llvm.org/D34896 llvm-svn: 307438
* [modules ts] Basic for module linkage.Richard Smith2017-07-079-27/+198
| | | | | | | | | | In addition to the formal linkage rules, the Modules TS includes cases where internal-linkage symbols within a module interface unit can be referenced from outside the module via exported inline functions / templates. We give such declarations "module-internal linkage", which is formally internal linkage, but results in an externally-visible symbol. llvm-svn: 307434
* [X86] Replace 'fallthrough' comments with LLVM_FALLTHROUGH.Craig Topper2017-07-071-6/+6
| | | | llvm-svn: 307420
* clang-format: [JS] do not wrap after "readonly".Martin Probst2017-07-073-7/+18
| | | | | | | | | | | | | | Summary: Breaks after "readonly" trigger automatic semicolon insertion in field declarations. Reviewers: krasimir, djasper Subscribers: klimek Differential Revision: https://reviews.llvm.org/D35112 llvm-svn: 307394
* Recommit [driver][macOS] Pick the system version for theAlex Lorenz2017-07-072-1/+32
| | | | | | | | | | | | | | | | | | | | deployment target if the SDK is newer than the system This commit reverts the revert commit r305891. Now the change from r305678 should be correct because `llvm::sys::getProcessTriple` now returns the correct macOS version of the system after the LLVM change r307372. Original commit message: This commit improves the driver by making sure that it picks the system version for the deployment target when the version of the macOS SDK is newer than the system version. rdar://29449467 Differential Revision: https://reviews.llvm.org/D34175 llvm-svn: 307388
* [driver][mips] Pass long-calls feature flag to the MIPS backendSimon Atanasyan2017-07-072-0/+13
| | | | | | | | Check the `-mlong-calls` command line option and pass the `long-calls` feature flag to the backend. Handling of this feature flag in the backend needs to be implemented by a separate commit. llvm-svn: 307386
* [Frontend] Verify that the bitstream is not empty before readingAlex Lorenz2017-07-073-0/+5
| | | | | | | | | | | | | | the serialised diagnostics Clang should avoid calling report_fatal_error when the file with the serialised diagnostics is empty. This commit changes Clang's serialised diagnostic reader, now it reports an appropriate error instead of crashing. rdar://31939877 Differential Revision: https://reviews.llvm.org/D35069 llvm-svn: 307384
* Fix crash parsing invalid codeOlivier Goffart2017-07-072-0/+11
| | | | | | | | | | | | | | | | | | | | | The code in the test caused a crash with this backtrace: RecordLayoutBuilder.cpp:2934: const clang::ASTRecordLayout &clang::ASTContext::getASTRecordLayout(const clang::RecordDecl *) const: Assertion `!D->isInvalidDecl() && "Cannot get layout of invalid decl!"' failed. [...] #7 0x00007f63963d845a __assert_fail_base (/usr/lib/libc.so.6+0x2c45a) #8 0x00007f63963d84d2 (/usr/lib/libc.so.6+0x2c4d2) #9 0x00007f63937a0631 clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const /home/olivier/prog/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2935:3 #10 0x00007f63937a1ad5 getFieldOffset(clang::ASTContext const&, clang::FieldDecl const*) /home/olivier/prog/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:3057:37 #11 0x00007f6391869f14 clang::Sema::RefersToMemberWithReducedAlignment(clang::Expr*, llvm::function_ref<void (clang::Expr*, clang::RecordDecl*, clang::FieldDecl*, clang::CharUnits)>) /home/olivier/prog/llvm/tools/clang/lib/Sema/SemaChecking.cpp:12139:23 #12 0x00007f639186a2f8 clang::Sema::CheckAddressOfPackedMember(clang::Expr*) /home/olivier/prog/llvm/tools/clang/lib/Sema/SemaChecking.cpp:12190:1 #13 0x00007f6391a7a81c clang::Sema::CheckAddressOfOperand(clang::ActionResult<clang::Expr*, true>&, clang::SourceLocation) /home/olivier/prog/llvm/tools/clang/lib/Sema/SemaExpr.cpp:11111:10 #14 0x00007f6391a7f5d2 clang::Sema::CreateBuiltinUnaryOp(clang::SourceLocation, clang::UnaryOperatorKind, clang::Expr*) /home/olivier/prog/llvm/tools/clang/lib/Sema/SemaExpr.cpp:11932:18 Fixing by bailing out for invalid classes. Differential Revision: https://reviews.llvm.org/D35108 llvm-svn: 307371
* [ObjC] Avoid the -Wunguarded-availability warnings for protocolAlex Lorenz2017-07-074-6/+39
| | | | | | | | | | | | | | | requirements in protocol/class/category declarations The unguarded availability warnings in the protocol requirements of a protocol /class/category declaration can be avoided. This matches the behaviour of Swift's diagnostics. The warnings for deprecated/unavailable protocols are preserved. rdar://33156429 Differential Revision: https://reviews.llvm.org/D35061 llvm-svn: 307368
* Update Cross-DSO CFI documentation.Evgeniy Stepanov2017-07-071-14/+28
| | | | | | | | | | Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35094 llvm-svn: 307341
* This call-site should have been updated as part of D34304.Sterling Augustine2017-07-061-3/+5
| | | | | | | | | | Summary: Use an argument adjuster to preserve behavior inadvertantly changed by D34304. Reviewers: klimek Differential Revision: https://reviews.llvm.org/D35095 llvm-svn: 307329
* Change remaining references to lit.util.capture to use subprocess.check_output.David L. Jones2017-07-062-4/+5
| | | | | | | | | | | | | | Summary: The capture() function was removed in r306625. This should fix PGO breakages reported by Michael Zolotukhin. Reviewers: mzolotukhin Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D35088 llvm-svn: 307320
* Reject attempts to build a module without -fmodules, rather than silently ↵Richard Smith2017-07-066-11/+30
| | | | | | doing weird things. llvm-svn: 307316
* Allow CompilerInvocations to generate .d files.Sterling Augustine2017-07-064-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Most clang tools should ignore the -M family of options because one wouldn't want them to generate a new dependency (.d) file. However, some tools may want this dependency file. This patch creates a mechanism for them to do this. This implementation just plumbs a boolean down several layers of calls. Each of the modified calls has several call sites, and so a single member variable or new API entry point won't work. An alternative would be to write a function to filter the -M family of arguments out of CC1Args, and have each caller call that function by hand before calling newInvocation, Invocation::run, or buildAstFromCodeWithArgs. This is a more complicated and error-prone solution. Why burden all the callers to remember to use this function? But I could rewrite this patch to use that method if that is deemed more appropriate. Reviewers: klimek Reviewed By: klimek Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D34304 llvm-svn: 307315
* [Objective-C] Fix non-determinism in clangMandeep Singh Grang2017-07-062-4/+50
| | | | | | | | | | | | | | Summary: Iteration of the unordered Ivars causes objc-modern-metadata-visibility.mm (uncovered by reverse iterating SmallPtrSet). Reviewers: dblaikie, davide, rsmith Reviewed By: dblaikie Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D34860 llvm-svn: 307296
* This reverts r305820 (ARMv.2-A FP16 vector intrinsics) because it showsSjoerd Meijer2017-07-0610-2348/+363
| | | | | | | | problems in testing, see comments in D34161 for some more details. A fix is in progres in D35011, but a revert seems better now as the fix will probably take some more time to land. llvm-svn: 307277
* [OpenMP] Extend CLANG target options with device offloading kind.Gheorghe-Teodor Bercea2017-07-0619-33/+75
| | | | | | | | | | | | | | Summary: Pass the type of the device offloading when building the tool chain for a particular target architecture. This is required when supporting multiple tool chains that target a single device type. In our particular use case, the OpenMP and CUDA tool chains will use the same ```addClangTargetOptions ``` method. This enables the reuse of common options and ensures control over options only supported by a particular tool chain. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, jlebar, hfinkel, tstellar, Hahnfeld Reviewed By: hfinkel Subscribers: jgravelle-google, aheejin, rengolin, jfb, dschuff, sbc100, cfe-commits Differential Revision: https://reviews.llvm.org/D29647 llvm-svn: 307272
* [OpenMP] Customize CUDA-based tool chain selectionGheorghe-Teodor Bercea2017-07-061-2/+16
| | | | | | | | | | | | | | Summary: This patch provides a generic way of selecting CUDA based tool chains as host-device pairs. Reviewers: arpith-jacob, caomhin, carlo.bertolli, ABataev, Hahnfeld, jlebar, hfinkel, tstellar Reviewed By: Hahnfeld Subscribers: rengolin, cfe-commits Differential Revision: https://reviews.llvm.org/D29658 llvm-svn: 307271
* [clang-format] Add TextProto language name, NFCKrasimir Georgiev2017-07-061-0/+2
| | | | llvm-svn: 307264
* [clang-format] Add space between a message field key and the opening bracket ↵Krasimir Georgiev2017-07-063-47/+48
| | | | | | | | | | | | | | | | | | in proto messages Summary: This patch updates the formatting of message fields of type `a{...}` to `a {...}` for proto messages. Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D35015 llvm-svn: 307261
* [OpenCL] Test on image access modifiers and image type can only be a type of ↵Egor Churaev2017-07-061-5/+28
| | | | | | | | | | | | | | a function argument. Reviewers: Anastasia Reviewed By: Anastasia Subscribers: yaxunl, cfe-commits, bader Differential Revision: https://reviews.llvm.org/D34980 llvm-svn: 307238
* [modules ts] Do not emit strong function definitions from the module ↵Richard Smith2017-07-064-2/+102
| | | | | | interface unit in every user. llvm-svn: 307232
* [cxx_status] Update link to Modules TS to latest working draft. Fix ↵Richard Smith2017-07-061-2/+3
| | | | | | Coroutines TS flag to work if copy-pasted. llvm-svn: 307231
* Fix test case in pre-C++11 mode; address Aaron Ballman's code review.Douglas Gregor2017-07-052-3/+3
| | | | llvm-svn: 307202
* Fix one more reference to lit.util.capture()Michael Zolotukhin2017-07-052-2/+4
| | | | | | The capture method was removed in r306643. llvm-svn: 307201
* Cope with Range-v3's CONCEPT_REQUIRES idiomDouglas Gregor2017-07-052-0/+60
| | | | llvm-svn: 307197
* Customize the SFINAE diagnostics for enable_if to provide the failed condition.Douglas Gregor2017-07-057-12/+165
| | | | | | | | | | | | | | | | | | | | When enable_if disables a particular overload resolution candidate, rummage through the enable_if condition to find the specific condition that caused the failure. For example, if we have something like: template< typename Iter, typename = std::enable_if_t<Random_access_iterator<Iter> && Comparable<Iterator_value_type<Iter>>>> void mysort(Iter first, Iter last) {} and we call "mysort" with "std::list<int>" iterators, we'll get a diagnostic saying that the "Random_access_iterator<Iter>" requirement failed. If we call "mysort" with "std::vector<something_not_comparable>", we'll get a diagnostic saying that the "Comparable<...>" requirement failed. llvm-svn: 307196
* Add docs for -foptimization-record-file=Brian Gesiak2017-07-051-0/+13
| | | | | | | | | | | | | | Summary: The Clang option was previously not included in the User's Manual. Reviewers: anemet, davidxl, hfinkel Reviewed By: hfinkel Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34928 llvm-svn: 307193
OpenPOWER on IntegriCloud