- Dec 17, 2016
-
-
Argyrios Kyrtzidis authored
These are unnecessary, the declarations already carry the 'extern C' property, and if there is mismatch between declaration and definition then we will get linker errors via libclang.exports. llvm-svn: 290025
-
Eugene Zelenko authored
llvm-svn: 290024
-
Devin Coughlin authored
Update the UnixAPIChecker to not diagnose for calls to functions that are declared in C++ namespaces. This avoids false positives when a namespaced function has the same name as a Unix API. This address PR28331. llvm-svn: 290023
-
Vedant Kumar authored
BPI may trigger signed overflow UB while computing branch probabilities for cold calls or to unreachables. For example, with our current choice of weights, we'll crash if there are >= 2^12 branches to an unreachable. Use a safer BranchProbability constructor which is better at handling fractions with large denominators. Changes since the initial commit: - Use explicit casts to ensure that multiplication operands are 64-bit ints. rdar://problem/29368161 Differential Revision: https://reviews.llvm.org/D27862 llvm-svn: 290022 -
Zachary Turner authored
llvm-svn: 290021
-
Zachary Turner authored
Differential Revision: https://reviews.llvm.org/D27835 llvm-svn: 290020
-
Vedant Kumar authored
This reverts commit r290016. It breaks this bot, even though the test passes locally: http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/32956/ AnalysisTests: /home/bb/ninja-x64-msvc-RA-centos6/llvm-project/llvm/lib/Support/BranchProbability.cpp:52: static llvm::BranchProbability llvm::BranchProbability::getBranchProbability(uint64_t, uint64_t): Assertion `Numerator <= Denominator && "Probability cannot be bigger than 1!"' failed. llvm-svn: 290019
-
Mike Aizatsky authored
Summary: This is superceded by protobuf mutation work. Reviewers: kcc Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D27865 llvm-svn: 290018
-
Mike Aizatsky authored
Differential Revision: https://reviews.llvm.org/D27863 llvm-svn: 290017
-
Vedant Kumar authored
BPI may trigger signed overflow UB while computing branch probabilities for cold calls or to unreachables. For example, with our current choice of weights, we'll crash if there are >= 2^12 branches to an unreachable. Use a safer BranchProbability constructor which is better at handling fractions with large denominators. rdar://problem/29368161 Differential Revision: https://reviews.llvm.org/D27862 llvm-svn: 290016
-
Lang Hames authored
llvm-svn: 290015
-
Matthias Braun authored
Differential Revision: https://reviews.llvm.org/D27559 llvm-svn: 290014
-
Matthias Braun authored
Factors out and reuses live-in computation code from BranchFolding. Differential Revision: https://reviews.llvm.org/D27558 llvm-svn: 290013
-
Paul Robinson authored
Feedback on r289468 from Adrian Prantl. llvm-svn: 290012
-
David Blaikie authored
Still prints the empty/tombstone keys (which some people would prefer, but I find pretty noisy) because I haven't yet found a reliable way to skip them (it requires calling into the running process to do so, which isn't ideal for a pretty printer (doesn't work on a core file, for example) - and gdb's ability to do so (or my ability to figure out how to get gdb to do so) is limited) left some breadcrumbs for the next person who might try to address that. llvm-svn: 290011
-
Sean Callanan authored
This is part of the effort to get the i686-mingw32-RA-on-linux bot to like clang-import-test. llvm-svn: 290010
-
Reid Kleckner authored
llvm-svn: 290009
-
Peter Collingbourne authored
llvm-svn: 290008
-
Alexandre Isoard authored
Add isl_multi_pw_aff* to GICHelper and add some missing isl_pw_multi_aff* handlers. llvm-svn: 290007
-
Sean Callanan authored
llvm-svn: 290006
-
Devin Coughlin authored
The openat() API has similar constraints to the open() API -- it just takes an extra parameter. rdar://problem/29526458 llvm-svn: 290005
-
Sean Callanan authored
LLVM's JIT is now the foundation of dynamic-compilation features for many languages. Clang also has low-level support for dynamic compilation (ASTImporter and ExternalASTSource, notably). How the compiler is set up for dynamic parsing is generally left up to individual clients, for example LLDB's C/C++/Objective-C expression parser and the ROOT project. Although this arrangement offers external clients the flexibility to implement dynamic features as they see fit, the lack of an in-tree client means that subtle bugs can be introduced that cause regressions in the external clients but aren't caught by tests (or users) until much later. LLDB for example regularly encounters complicated ODR violation scenarios where it is not immediately clear who is at fault. Other external clients (notably, Cling) rely on similar functionality, and another goal is to break this functionality up into composable parts so that any client can be built easily on top of Clang without requiring extensive additional code. I propose that the parts required to build a simple expression parser be added to Clang. Initially, I aim to have the following features: - A piece that looks up external declarations from a variety of sources (e.g., from previous dynamic compilations, from modules, or from DWARF) and uses clear conflict resolution rules to reconcile differences, with easily understood errors. This functionality will be supported by in-tree tests. - A piece that works hand in hand with the LLVM JIT to resolve the locations of external declarations so that e.g. variables can be redeclared and (for high-performance applications like DTrace) external variables can be accessed directly from the registers where they reside. This commit adds a tester that parses a sequence of source files and then uses them as source data for an expression. External references are resolved using an ExternalASTSource that responds to name queries using an ASTImporter. This is the setup that LLDB uses, and the motivating reason for MinimalImport in ASTImporter. When complete, this tester will implement the first of the above goals. Differential Revision: https://reviews.llvm.org/D27180 llvm-svn: 290004
-
Peter Collingbourne authored
llvm-svn: 290003
-
Zachary Turner authored
Differential Revision: https://reviews.llvm.org/D27860 llvm-svn: 290002
-
Kevin Enderby authored
The Mach-O command line flag like "-arch armv7m" does not match the arch name part of its llvm Triple which is "thumbv7m-apple-darwin”. I think the best way to fix this is to have llvm::object::MachOObjectFile::getArchTriple() optionally return the name of the Mach-O arch flag that would be used with -arch that matches the CPUType and CPUSubType. Then change llvm::object::MachOUniversalBinary::ObjectForArch::getArchTypeName() to use that and change it to getArchFlagName() as the type name is really part of the Triple and the -arch flag name is a Mach-O thing for a specific Triple with a specific Mcpu value. rdar://29663637 llvm-svn: 290001
-
Zachary Turner authored
The original patch was broken due to some undefined behavior as well as warnings that were triggering -Werror. llvm-svn: 290000
-
Kostya Serebryany authored
llvm-svn: 289999
-
Kostya Serebryany authored
[libFuzzer] add an experimental flag -experimental_len_control=1 that sets max_len to 1M and tries to increases the actual max sizes of mutations very gradually. Also remove a bit of dead code llvm-svn: 289998
-
Reid Kleckner authored
llvm-svn: 289997
-
Peter Collingbourne authored
llvm-svn: 289996
-
Argyrios Kyrtzidis authored
[libclang] Restore the CXXRecordDecl path for clang_Type_getNumTemplateArguments and clang_Type_getTemplateArgumentAsType Patch by Emilio Cobos Álvarez! See https://reviews.llvm.org/D26907 llvm-svn: 289995
-
Zachary Turner authored
llvm-svn: 289994
-
Teresa Johnson authored
Summary: When reading the metadata bitcode, create a type declaration when possible for composite types when we are importing. Doing this in the bitcode reader saves memory. Also it works naturally in the case when the type ODR map contains a definition for the same composite type because it was used in the importing module (buildODRType will automatically use the existing definition and not create a type declaration). For Chromium built with -g2, this reduces the aggregate size of the generated native object files by 66% (from 31G to 10G). It reduced the time through the ThinLTO link and backend phases by about 20% on my machine. Reviewers: mehdi_amini, dblaikie, aprantl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27775 llvm-svn: 289993
-
Michael Kuperstein authored
Differential Revision: https://reviews.llvm.org/D27830 llvm-svn: 289992
-
Yaxun Liu authored
llvm-svn: 289991
-
Akira Hatanaka authored
lambda expression is instantiated. Rather than waiting until Sema::CheckCXXDefaultArgExpr tries to transform the default arguments (which fails because it can't get the template arguments that are used), transform the default arguments earlier when the lambda expression is transformed in TransformLambdaExpr. rdar://problem/27535319 Differential Revision: https://reviews.llvm.org/D23096 llvm-svn: 289990
-
Kelvin Li authored
This patch is to add support of the 'is_device_ptr' clause in the 'target parallel' pragma. Differential Revision: https://reviews.llvm.org/D27821 llvm-svn: 289989 -
Jun Bum Lim authored
This is recommit of r287553 after fixing the invalid loop info after eliminating an empty block and unit test failures in AVR and WebAssembly : Summary: Merging an empty case block into the header block of switch could cause ISel to add COPY instructions in the header of switch, instead of the case block, if the case block is used as an incoming block of a PHI. This could potentially increase dynamic instructions, especially when the switch is in a loop. I added a test case which was reduced from the benchmark I was targetting. Reviewers: t.p.northover, mcrosier, manmanren, wmi, joerg, davidxl Subscribers: joerg, qcolombet, danielcdh, hfinkel, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D22696 llvm-svn: 289988
-
Sanjoy Das authored
As a one liner function, I don't think it is pulling its weight in terms of helping readability. llvm-svn: 289987
-
Akira Hatanaka authored
Also, dump the AST and run FileCheck to make sure the expected nodes are created in the AST. llvm-svn: 289986
-