summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CppBackend/CPPBackend.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-0/+2
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* do not rely on callee being operand 0Gabor Greif2009-03-251-1/+1
| | | | llvm-svn: 67681
* Now that errs() is properly non-buffered, there's no need toDan Gohman2009-03-231-1/+0
| | | | | | explicitly flush it. llvm-svn: 67526
* It makes no sense to have a ODR version of commonDuncan Sands2009-03-111-4/+2
| | | | | | linkage, so remove it. llvm-svn: 66690
* Remove the one-definition-rule version of extern_weakDuncan Sands2009-03-111-4/+2
| | | | | | | linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. llvm-svn: 66650
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-8/+16
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Add the private linkage.Rafael Espindola2009-01-151-0/+2
| | | | llvm-svn: 62279
* make -march=cpp handle the nocapture attribute, make it assert if itChris Lattner2009-01-131-22/+19
| | | | | | sees attributes it doesn't know. llvm-svn: 62155
* Update CPP backend for PrintModulePass API changes.Dan Gohman2008-12-081-4/+4
| | | | llvm-svn: 60690
* Adds extern "C" ints to the .cpp files that use RegisterTarget, asOscar Fuentes2008-11-151-0/+8
| | | | | | | | | | | well as 2 files that use "Registrator"s. These are to be used by the MSVC builds, as the Win32 linker does not include libs that are otherwise unreferenced, even if global constructors in the lib have side-effects. Patch by Scott Graham! llvm-svn: 59378
* Typo fixAnton Korobeynikov2008-11-091-1/+1
| | | | llvm-svn: 58928
* The Index field of an AttributeWithIndex is of type unsigned, not uint16_t.Nicolas Geoffray2008-11-081-2/+2
| | | | llvm-svn: 58908
* StoreInst does not produce any result thus it's useless to create newAnton Korobeynikov2008-11-081-1/+1
| | | | | | | variable for it. This greatly reduces amount of unused variables in llvm2cpp-generated code llvm-svn: 58905
* Fix command-line option printing to print two spaces where needed,Dan Gohman2008-10-141-1/+1
| | | | | | | | | instead of requiring all "short description" strings to begin with two spaces. This makes these strings less mysterious, and it fixes some cases where short description strings mistakenly did not begin with two spaces. llvm-svn: 57521
* Add a "loses information" return value to APFloat::convertDale Johannesen2008-10-091-1/+2
| | | | | | | and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. llvm-svn: 57329
* Rename APFloat::convertToAPInt to bitcastToAPInt toDale Johannesen2008-10-091-2/+3
| | | | | | | make it clearer what the function does. No functional change. llvm-svn: 57325
* Emit type-correct constant null. Also fix a typo.Anton Korobeynikov2008-10-051-7/+3
| | | | | | Patch by Robert G. Jakabosky! llvm-svn: 57110
* Large mechanical patch.Devang Patel2008-09-251-34/+34
| | | | | | | | | | | | | | | s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. llvm-svn: 56622
* s/ParamAttrsWithIndex/FnAttributeWithIndex/gDevang Patel2008-09-241-2/+2
| | | | llvm-svn: 56535
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-1/+1
| | | | llvm-svn: 56513
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Use raw_ostream throughout the AsmPrinter.Owen Anderson2008-08-211-10/+11
| | | | llvm-svn: 55092
* Unbreak cpp backend: upgrade output due to change in APInt APIAnton Korobeynikov2008-08-181-1/+2
| | | | llvm-svn: 54942
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-2/+2
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. llvm-svn: 54899
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-171-2/+2
| | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. llvm-svn: 54873
* Remove <iostream> include.Bill Wendling2008-07-271-2/+2
| | | | llvm-svn: 54131
* CPPBackend support for extractvalue and insertvalue.Dan Gohman2008-06-091-0/+34
| | | | llvm-svn: 52147
* Abort on an unrecognized opcode.Dan Gohman2008-06-091-0/+4
| | | | llvm-svn: 52146
* Update the CPP backend for the ConstantFP::get API change.Dan Gohman2008-06-091-4/+0
| | | | llvm-svn: 52144
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-161-1/+1
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) llvm-svn: 51200
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-141-0/+2
| | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. llvm-svn: 51118
* Fix typo in ParameterAttribute fields usage. Add an includeNicolas Geoffray2008-05-141-2/+3
| | | | | | to make the Cpp backend output compilable. llvm-svn: 51095
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-3/+3
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Don't do stupid things: doInitialization(Module&) is not applicable to ↵Anton Korobeynikov2008-04-291-17/+2
| | | | | | ModulePass :) llvm-svn: 50433
* Drop dead includesAnton Korobeynikov2008-04-231-3/+0
| | | | llvm-svn: 50192
* Adjust option names for C++ backendAnton Korobeynikov2008-04-231-11/+11
| | | | llvm-svn: 50190
* First step of implementing PR1538: move llvm2cpp logic to new 'target'Anton Korobeynikov2008-04-231-0/+1971
llvm-svn: 50189
OpenPOWER on IntegriCloud