summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Mangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing spaceFangrui Song2018-07-301-1/+1
| | | | | | sed -Ei 's/[[:space:]]+$//' include/**/*.{def,h,td} lib/**/*.{cpp,h} llvm-svn: 338291
* [modules ts] Ensure that module linkage variables are always emitted and ↵Richard Smith2017-09-071-0/+5
| | | | | | always have their name mangled. llvm-svn: 312684
* [AST/ObjC] Make ObjCCategoryImplDecl consistent with ObjCCategoryDecl and ↵Argyrios Kyrtzidis2017-03-071-2/+6
| | | | | | | | use the category name as its DeclName This also addresses the badness in ObjCCategoryImplDecl's API, which was hiding NamedDecl's APIs with different meaning. llvm-svn: 297131
* regcall: Implement regcall Calling Conv in clangErich Keane2016-11-021-0/+3
| | | | | | | | | | This patch implements the register call calling convention, which ensures as many values as possible are passed in registers. CodeGen changes were committed in https://reviews.llvm.org/rL284108. Differential Revision: https://reviews.llvm.org/D25204 llvm-svn: 285849
* Make TargetInfo store an actual DataLayout instead of a string.James Y Knight2016-03-041-3/+3
| | | | | | | | | | | | | | Use it to calculate UserLabelPrefix, instead of specifying it (often incorrectly). Note that the *actual* user label prefix has always come from the DataLayout, and is handled within LLVM. The main thing clang's TargetInfo::UserLabelPrefix did was to set the #define value. Having these be different from each-other is just silly. Differential Revision: http://reviews.llvm.org/D17183 llvm-svn: 262737
* [index] Factor libclang's functionality to determing the mangled name of ↵Argyrios Kyrtzidis2016-02-141-6/+10
| | | | | | symbols into the clangIndex library. llvm-svn: 260858
* Update for LLVM function name change.Rui Ueyama2016-01-141-3/+3
| | | | llvm-svn: 257802
* Remove and forbid raw_svector_ostream::flush() calls.Yaron Keren2015-08-131-3/+0
| | | | | | | | | | After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
* This patch fixes a crash involving use of predefinedFariborz Jahanian2014-12-021-1/+5
| | | | | | | | expressions. It fixes crash when mangling name for block's helper function used inside a constructor/destructor. rdar://19065361. llvm-svn: 223136
* This patch fixes couple of bugs for predefined expressionFariborz Jahanian2014-11-141-11/+13
| | | | | | | | | used inside blocks. It fixes a crash in naming code for __func__ etc. when used in a block declared globally. It also brings back old naming convention for predefined expression which was broken. rdar://18961148 llvm-svn: 222065
* Implement IRGen for the x86 vectorcall conventionReid Kleckner2014-10-311-22/+31
| | | | | | | | | | | | | | | The most complex aspect of the convention is the handling of homogeneous vector and floating point aggregates. Reuse the homogeneous aggregate classification code that we use on PPC64 and ARM for this. This convention also has a C mangling, and we apparently implement that in both Clang and LLVM. Reviewed By: majnemer Differential Revision: http://reviews.llvm.org/D6063 llvm-svn: 221006
* CodeGen: correct block mangling in ObjCSaleem Abdulrasool2014-10-141-1/+6
| | | | | | | | | | | | Mangling for blocks defined within blocks in an ObjectiveC context were also broken by SVN r219393. Because the code in mangleName assumed that the code was either C or C++, we would trigger assertions when trying to mangle the inner blocks in an ObjectiveC context. Add a test and use the ObjectiveC specific mangling when dealing with an ObjectiveC method declaration. llvm-svn: 219697
* CodeGen: correct mangling for blocksSaleem Abdulrasool2014-10-141-0/+6
| | | | | | | | | | | | | | | This addresses a regression introduced with SVN r219393. A block may be contained within another block. In such a scenario, we would end up within a BlockDecl, which is not a NamedDecl (as the names are synthesised). The cast to a NamedDecl of the DeclContext would then assert as the types are unrelated. Restore the mangling behaviour to that prior to SVN r219393. If the current block is contained within a BlockDecl, walk up to the parent DeclContext, recursively, until we have a non-BlockDecl. This is expected to be a NamedDecl. Add in a couple of asserts to ensure that the assumption that we only encounter a block within a NamedDecl or a BlockDecl. llvm-svn: 219696
* [C++11] Replacing FunctionProtoType iterators param_type_begin() and ↵Aaron Ballman2014-03-171-5/+1
| | | | | | param_type_end() with iterator_range param_types(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204045
* Pass llvm::Triple objects by const reference.Benjamin Kramer2014-03-041-1/+1
| | | | | | Copying isn't cheap as it contains a std::string. llvm-svn: 202880
* Rename FunctionProtoType accessors from 'arguments' to 'parameters'Alp Toker2014-01-201-2/+2
| | | | | | | | | | | | | | | | | Fix a perennial source of confusion in the clang type system: Declarations and function prototypes have parameters to which arguments are supplied, so calling these 'arguments' was a stretch even in C mode, let alone C++ where default arguments, templates and overloading make the distinction important to get right. Readability win across the board, especially in the casting, ADL and overloading implementations which make a lot more sense at a glance now. Will keep an eye on the builders and update dependent projects shortly. No functional change. llvm-svn: 199686
* Sort all the #include lines with LLVM's utils/sort_includes.py whichChandler Carruth2014-01-071-1/+1
| | | | | | | encodes the canonical rules for LLVM's style. I noticed this had drifted quite a bit when cleaning up LLVM, so wanted to clean up Clang as well. llvm-svn: 198686
* Fixed a FIXME; created a print method for Selectors that accepts a ↵Aaron Ballman2014-01-031-1/+3
| | | | | | | | raw_ostream, and started using it in places it made sense. No functional changes intended, just API cleanliness. llvm-svn: 198428
* On 32 bit windows, mangle stdcall and fastcall decls in clang.Rafael Espindola2013-10-161-0/+126
| | | | | | | | | | | This removes the dependency on the llvm mangler doing it for us. In isolation, the benefit is that the testing of what mangling is applied is all in one place: (C, C++) X (Itanium, Microsoft) are all handled by clang. This also gives me hope that in the future the llvm mangler (and llvm-ar) will not depend on TargetMachine. llvm-svn: 192762
* Get rid of dead/useless code for block mangling.Eli Friedman2013-07-101-33/+0
| | | | llvm-svn: 185989
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* block literal irgen: several improvements on naming blockFariborz Jahanian2012-06-261-6/+23
| | | | | | | | | | | | literal helper functions. All helper functions (global and locals) use block_invoke as their prefix. Local literal helper names are prefixed by their enclosing mangled function names. Blocks in non-local initializers (e.g. a global variable or a C++11 field) are prefixed by their mangled variable name. The descriminator number added to end of the name starts off with blank (for first block) and _<N> (for the N+2-th block). llvm-svn: 159206
* Switch the ObjC*Decl raw_stream overloads to take a reference, for ↵Benjamin Kramer2012-02-071-1/+1
| | | | | | consistency with NamedDecls. llvm-svn: 149981
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-4/+4
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+2
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-8/+8
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Implement support for C++11 in-class initialization of non-static data members.Richard Smith2011-06-111-0/+5
| | | | llvm-svn: 132878
* For consistency, use llvm::raw_ostream in the rest of the mangle api.Rafael Espindola2011-02-111-7/+7
| | | | llvm-svn: 125360
* Use raw_ostream instead of raw_svector_ostream.Rafael Espindola2011-02-111-6/+6
| | | | llvm-svn: 125330
* Use raw_svector_ostream in more places in the mangler.Rafael Espindola2011-02-101-16/+19
| | | | llvm-svn: 125321
* Move name mangling support from CodeGen to AST. In thePeter Collingbourne2011-01-131-0/+132
process, perform a number of refactorings: - Move MiscNameMangler member functions to MangleContext - Remove GlobalDecl dependency from MangleContext - Make MangleContext abstract and move Itanium/Microsoft functionality to their own classes/files - Implement ASTContext::createMangleContext and have CodeGen use it No (intended) functionality change. llvm-svn: 123386
OpenPOWER on IntegriCloud