summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Module.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Clarify the ownership model of LLVMContext and Module. Namely, contexts ownOwen Anderson2010-09-081-0/+2
| | | | | | | modules are instantiated in them. If the context is deleted, all of its owned modules are also deleted. llvm-svn: 113374
* Eliminate unnecessary empty string literals.Dan Gohman2010-08-041-1/+1
| | | | llvm-svn: 110183
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-6/+15
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* Use single interface, using twine, to get named metadata.Devang Patel2010-06-221-5/+1
| | | | | | getNamedMetadata(). llvm-svn: 106518
* Tidy.Bob Wilson2010-06-191-2/+2
| | | | llvm-svn: 106383
* Use separate named MDNode to hold each function's local variable info.Devang Patel2010-06-161-0/+7
| | | | | | This speeds up local variable handling in DwarfDebug. llvm-svn: 106075
* fix an infinite loop in Module::getEndianness, PR6684Chris Lattner2010-03-231-1/+1
| | | | | | patch by Alex Mac! llvm-svn: 99330
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-1/+48
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* Use ilist_tratis to autoinsert and remove NamedMDNode from MDSymbolTable.Devang Patel2010-01-121-6/+0
| | | | llvm-svn: 93247
* Reimplement getToken and SplitString as "StringRef helper functions"Benjamin Kramer2010-01-111-7/+10
| | | | | | | | | - getToken is modeled after StringRef::split but it can split on multiple separator chars and skips leading seperators. - SplitString is a StringRef::split variant for more than 2 elements with the same behaviour as getToken. llvm-svn: 93161
* Delete NamedMDSymTable while destrucing Module.Devang Patel2010-01-091-0/+1
| | | | | | Disable copy ctor and operator= for NamedMDSymTable. Hide typedef that should be public. llvm-svn: 93041
* Use separate namespace for named metadata.Devang Patel2010-01-071-3/+9
| | | | llvm-svn: 92931
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-291-0/+14
| | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
* Qualify a bunch of explicit template instantiations to satisfy clang++.John McCall2009-12-191-3/+3
| | | | llvm-svn: 91736
* Pass StringRef by value.Daniel Dunbar2009-11-061-17/+17
| | | | llvm-svn: 86251
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-061-2/+1
| | | | | | from various APIs, addressing PR5325. llvm-svn: 86231
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-3/+4
| | | | llvm-svn: 78948
* Add getOrInsertNamedMetadata().Devang Patel2009-07-301-3/+14
| | | | llvm-svn: 77646
* Do not use getNamedValue() to lookup NamedMDNode. NamedMDNode is not a ↵Devang Patel2009-07-301-1/+1
| | | | | | | | GlobalValue. Thanks Benjamin Kramer! llvm-svn: 77619
* Move types back to the 2.5 API.Owen Anderson2009-07-291-6/+6
| | | | llvm-svn: 77516
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-2/+2
| | | | llvm-svn: 77494
* Keep track of named mdnodes in a Module using an ilist.Devang Patel2009-07-291-0/+8
| | | | llvm-svn: 77476
* Finish migrating VMCore to StringRef/Twine based APIs.Daniel Dunbar2009-07-251-25/+16
| | | | llvm-svn: 77051
* Switch ValueSymbolTable to StringRef based API.Daniel Dunbar2009-07-231-1/+1
| | | | llvm-svn: 76894
* LLVMContext-ification.Owen Anderson2009-07-081-6/+8
| | | | llvm-svn: 75072
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-081-10/+6
| | | | | | module is required. llvm-svn: 75025
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-081-3/+7
| | | | llvm-svn: 74985
* Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson2009-07-011-1/+1
| | | | | | | | the last time, for the moment, that I will need to make far-reaching changes. llvm-svn: 74655
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-1/+1
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-2/+3
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* "ghostify" the ilist<Function> sentinelGabor Greif2009-03-271-8/+0
| | | | llvm-svn: 67872
* further simplifications arising from peruse of the more declarative interfaceGabor Greif2009-03-071-10/+0
| | | | llvm-svn: 66333
* Add Module::getNamedValue; use to normalize access to Module symbolDaniel Dunbar2009-03-061-19/+21
| | | | | | | table. - No functionality change. llvm-svn: 66289
* Reapply 63765. Patches for clang and llvm-gcc to follow.Dale Johannesen2009-02-051-0/+19
| | | | llvm-svn: 63812
* Reverting 63765. This broke the build of both clangDale Johannesen2009-02-041-19/+0
| | | | | | and llvm-gcc. llvm-svn: 63786
* New feature: add support for target intrinsics being defined in theNate Begeman2009-02-041-0/+19
| | | | | | | | | target directories themselves. This also means that VMCore no longer needs to know about every target's list of intrinsics. Future work will include converting the PowerPC target to this interface as an example implementation. llvm-svn: 63765
* Add the private linkage.Rafael Espindola2009-01-151-6/+5
| | | | llvm-svn: 62279
* Add a mechanism to specify attributes in getOrInsertFunction.Nick Lewycky2009-01-041-2/+29
| | | | llvm-svn: 61645
* Add comments to function.Bill Wendling2008-11-051-0/+6
| | | | llvm-svn: 58781
* - Add a "getOrInsertGlobal" method to the Module class. This acts similarly toBill Wendling2008-11-041-0/+22
| | | | | | | | | | "getOrInsertFunction" in that it either adds a new declaration of the global and returns it, or returns the current one -- optionally casting it to the correct type. - Use the new getOrInsertGlobal in the stack protector code. - Use "splitBasicBlock" in the stack protector code. llvm-svn: 58727
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | use raw_ostream instead of std::ostream. Among other goodness, this speeds up llvm-dis of kc++ with a release build from 0.85s to 0.49s (88% faster). Other interesting changes: 1) This makes Value::print be non-virtual. 2) AP[S]Int and ConstantRange can no longer print to ostream directly, use raw_ostream instead. 3) This fixes a bug in raw_os_ostream where it didn't flush itself when destroyed. 4) This adds a new SDNode::print method, instead of only allowing "dump". A lot of APIs have both std::ostream and raw_ostream versions, it would be useful to go through and systematically anihilate the std::ostream versions. This passes dejagnu, but there may be minor fallout, plz let me know if so and I'll fix it. llvm-svn: 55263
* simplify some code to avoid string thrashing.Chris Lattner2008-06-271-3/+5
| | | | llvm-svn: 52837
* Add a new version of Module::getFunction that takes a const char* insteadChris Lattner2008-06-271-0/+5
| | | | | | | of a std::string. This avoids copying the string to the heap in common cases. Patch by Pratik Solanki! llvm-svn: 52834
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-2/+2
| | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
* Remove an unnecessary #includeDan Gohman2008-03-101-1/+0
| | | | llvm-svn: 48193
* Fix 80-col violations.Dan Gohman2008-01-291-1/+2
| | | | llvm-svn: 46510
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-171-2/+2
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. llvm-svn: 45082
* Implement review feedback. Aliasees can be either GlobalValue's orAnton Korobeynikov2007-04-281-0/+3
| | | | | | bitcasts of them. llvm-svn: 36537
* Implement aliases. This fixes PR1017 and it's dependent bugs. CFE partAnton Korobeynikov2007-04-251-0/+23
| | | | | | will follow. llvm-svn: 36435
OpenPOWER on IntegriCloud