- Mar 24, 2016
-
-
Reid Kleckner authored
This is necessary to support the dynamic CRT (/MD) with VS2015. In VS2015, these symbols are no longer imported from a DLL, they provided statically by msvcrt.lib. This means our approach of hotpatching the DLL no longer works. By exporting the symbols, we end up relying on the same mechanism that we use to intercept symbols in the static CRT (/MT) case. The ASan runtime always needs to appear first on the link line, and the linker searches for symbol definitions from left to right. This means we can stop hotpatching operator new and delete in the CRT, which is nice. I think that the only reason we weren't exporting the symbols already is because MSVC doesn't allow you to do it directly with __declspec(dllexport). Instead, we can use `#pragma comment(linker, "/export:foo")`, which is most of what the attribute does under the hood. It does mean we have to write down the mangled names of the operators, but that's not too bad. llvm-svn: 264190
-
Richard Smith authored
instantiate to match a friend class declaration. It's still pretty dumb, though. llvm-svn: 264189
-
Kevin Enderby authored
Sorry had this fixed in my check out but failed mention it in my commit message for r264187. llvm-svn: 264188
-
Kevin Enderby authored
in the test suite. While this is not really an interesting tool and option to run on a Mach-O file to show the symbol table in a generic libObject format it shouldn’t crash. The reason for the crash was in MachOObjectFile::getSymbolType() when it was calling MachOObjectFile::getSymbolSection() without checking its return value for the error case. What makes this fix require a fair bit of diffs is that the method getSymbolType() is in the class ObjectFile defined without an ErrorOr<> so I needed to add that all the sub classes. And all of the uses needed to be updated and the return value needed to be checked for the error case. The MachOObjectFile version of getSymbolType() “can” get an error in trying to come up with the libObject’s internal SymbolRef::Type when the Mach-O symbol symbol type is an N_SECT type because the code is trying to select from the SymbolRef::ST_Data or SymbolRef::ST_Function values for the SymbolRef::Type. And it needs the Mach-O section to use isData() and isBSS to determine if it will return SymbolRef::ST_Data. One other possible fix I considered is to simply return SymbolRef::ST_Other when MachOObjectFile::getSymbolSection() returned an error. But since in the past when I did such changes that “ate an error in the libObject code” I was asked instead to push the error out of the libObject code I chose not to implement the fix this way. As currently written both the COFF and ELF versions of getSymbolType() can’t get an error. But if isReservedSectionNumber() wanted to check for the two known negative values rather than allowing all negative values or the code wanted to add the same check as in getSymbolAddress() to use getSection() and check for the error then these versions of getSymbolType() could return errors. At the end of the day the error printed now is the generic “Invalid data was encountered while parsing the file” for object_error::parse_failed. In the future when we thread Lang’s new TypedError for recoverable error handling though libObject this will improve. And where the added // Diagnostic(… comment is, it would be changed to produce and error message like “bad section index (42) for symbol at index 8” for this case. llvm-svn: 264187
-
Sanjay Patel authored
This should be hoisted further up so it can be used in DAGCombiner and other backends, but I'm limiting the scope in the interest of patch minimalism. It's not quite NFC because some of the replaced code was using an 'if' check rather than a 'while' loop, so those cases would only look through a single bitcast. llvm-svn: 264186
-
Chad Rosier authored
llvm-svn: 264185
-
Richard Smith authored
lambda-expression. We don't actually instantiate the closure type / operator() in the template in order to produce the closure type / operator() in the instantiation, so this isn't caught by the normal path. llvm-svn: 264184
-
Kyle Butt authored
Add Word rotates to the list of instructions that are zero extending. This allows them to be used in dot form to compare with zero. llvm-svn: 264183
-
Nico Weber authored
Instead of putting the /Yc header into ExtraDeps, give DependencyOutputOptions a dedicated field for /Yc mode, and let HeaderIncludesCallback hang on to the full DependencyOutputOptions object, not just ExtraDeps. Reverts parts of r263352 that are now no longer needed. llvm-svn: 264182
-
Davide Italiano authored
Similarly to how we do with linkonce_odr symbols already, but change their linkage to weak. llvm-svn: 264181
-
George Burgess IV authored
There are a few bugs in the walker that this patch addresses. Primarily: - Caching can break when we have multiple BBs without phis - We weren't optimizing some phis properly - Because of how the DFS iterator works, there were times where we wouldn't cache any results of our DFS I left the test cases with FIXMEs in, because I'm not sure how much effort it will take to get those to work (read: We'll probably ultimately have to end up redoing the walker, or we'll have to come up with some creative caching tricks), and more test coverage = better. Differential Revision: http://reviews.llvm.org/D18065 llvm-svn: 264180
-
Easwaran Raman authored
Differential Revision: http://reviews.llvm.org/D18233 llvm-svn: 264179
-
Nico Weber authored
Most things even work; see the included FIXMEs for things that need polishing. Also don't warn about unused flags for the `/Yuh2.h /FIh1.h /FIh2.h`. The common case is that the pch was built with `/Ych2.h /FIh1.h /FIh2.h`, so h1.h is in the PCH, and we shouldn't warn about /FIh1.h not having an effect. (If we wanted to get fancy, we could store the list of -include flags in the pch and then check that it matches later on.) llvm-svn: 264178
-
Justin Bogner authored
Index is already a StoreSDNode, so this dyn_cast doesn't do anything. llvm-svn: 264177
-
Davide Italiano authored
llvm-svn: 264176
-
Davide Italiano authored
As requested by Rafael. llvm-svn: 264175
-
Nico Weber authored
-H in gcc mode doesn't print -include headers, but they are included in depfiles written by MMD and friends. Since /showIncludes is what's used instead of depfiles, printing /FI there seems important (and matches cl.exe). Instead of giving HeaderIncludeGen more options, just switch on ShowAllHeaders in clang-cl mode and let clang::InitializePreprocessor() not put -include flags in the <command line> block. This changes the behavior of -E slightly, and it removes the <command line> flag from the output triggered by setting the obscure CC_PRINT_HEADERS=1 env var to true while running clang. Both of these seem ok to change. http://reviews.llvm.org/D18401 llvm-svn: 264174
-
Stephane Sezer authored
Reviewers: zturner, clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17970 llvm-svn: 264173
-
Pete Cooper authored
We were already copying this data to a temporary for endian swaps. Now we just always copy it, but still only do the endian swaps when needed. llvm-svn: 264172
-
Davide Italiano authored
llvm-svn: 264171
-
Faisal Vali authored
llvm-svn: 264170
-
Mike Spertus authored
llvm-svn: 264169
-
Kuba Brecka authored
llvm-svn: 264168
-
Manman Ren authored
Before this commit, we assert failure in ImplicitCastExpr "unheralded conversion to bool". This commit fixes the assertion by using the correct cast type when the fixed type is boolean. This commit also fixes the behavior for Microsoft mode as well, since Obj-C and Microsoft mode share the same code path. rdar://24999533 llvm-svn: 264167
-
Jonathan Peyton authored
Have Visual Studio use MemoryBarrier() instead of _mm_mfence() and remove __declspec align attribute from function parameters in kmp_atomic.h llvm-svn: 264166
-
Artyom Skrobov authored
Reviewers: rengolin, t.p.northover Subscribers: aemerson, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D18393 llvm-svn: 264165
-
Chih-Hung Hsieh authored
Differential Revision: http://reviews.llvm.org/D18363 llvm-svn: 264164
-
- Mar 23, 2016
-
-
Nico Weber authored
http://reviews.llvm.org/D18392 llvm-svn: 264163
-
Kuba Brecka authored
This patch adds ThreadSanitizer support into LLDB: - Adding a new InstrumentationRuntime plugin, ThreadSanitizerRuntime, in the same way ASan is implemented. - A breakpoint stops in `__tsan_on_report`, then we extract all sorts of information by evaluating an expression. We then populate this into StopReasonExtendedInfo. - SBThread gets a new API, SBThread::GetStopReasonExtendedBacktraces(), which returns TSan’s backtraces in the form of regular SBThreads. Non-TSan stop reasons return an empty collection. - Added some test cases. Reviewed by Greg Clayton. llvm-svn: 264162
-
Silviu Baranga authored
[SCEV] Change the SCEV Predicates interfaces for conversion to AddRecExpr to return SCEVAddRecExpr* instead of SCEV* Summary: This changes the conversion functions from SCEV * to SCEVAddRecExpr from ScalarEvolution and PredicatedScalarEvolution to return a SCEVAddRecExpr* instead of a SCEV* (which removes the need of most clients to do a dyn_cast right after calling these functions). We also don't add new predicates if the transformation was not successful. This is not entirely a NFC (as it can theoretically remove some predicates from LAA when we have an unknown dependece), but I couldn't find an obvious regression test for it. Reviewers: sanjoy Subscribers: sanjoy, mzolotukhin, llvm-commits Differential Revision: http://reviews.llvm.org/D18368 llvm-svn: 264161
-
Rafael Espindola authored
Without this predicate we were not producing R_386_RELATIVE relocations. llvm-svn: 264160
-
Alexander Kornienko authored
llvm-svn: 264158
-
Simon Pilgrim authored
llvm-svn: 264157
-
Oliver Stannard authored
If we can't handle a relocation type, report it as an error in the source, rather than asserting. I've added a more descriptive message and a test for the only cases of this that I've been able to trigger. Differential Revision: http://reviews.llvm.org/D18388 llvm-svn: 264156
-
Artyom Skrobov authored
Reviewers: rengolin, t.p.northover Subscribers: aemerson, cfe-commits, rengolin Differential Revision: http://reviews.llvm.org/D18391 llvm-svn: 264155
-
Tobias Grosser authored
Delinearization is now enabled by default and does not need to explicitly need to be enabled in our tests. llvm-svn: 264154
-
Andrew Wilkins authored
llvm-svn: 264153
-
Renato Golin authored
This reverts commits r264068 and r264079, and they were breaking the build and weren't reverted in time, nor they exhibited expected behaviour from the reviewers. There is more to discuss than just a test fix. llvm-svn: 264150
-
Andrey Turetskiy authored
Differential Revision: http://reviews.llvm.org/D13980 llvm-svn: 264149
-
Andrey Turetskiy authored
Add FeatureX87 in X86 backend to be able to define CPUs which doesn't have x87. Differential Revision: http://reviews.llvm.org/D13979 llvm-svn: 264148
-