[cfe-commits] r102497 - /cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Apr 28 09:07:06 PDT 2010
On 28.04.2010, at 17:57, Douglas Gregor wrote:
>
> On Apr 28, 2010, at 7:29 AM, David Chisnall wrote:
>
>> Author: theraven
>> Date: Wed Apr 28 09:29:56 2010
>> New Revision: 102497
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=102497&view=rev
>> Log:
>> Emit the correct symbol name for the class (GNU runtime).
>>
>>
>> Modified:
>> cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
>>
>> Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=102497&r1=102496&r2=102497&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
>> +++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Wed Apr 28 09:29:56 2010
>> @@ -112,7 +112,8 @@
>> llvm::Constant *Methods,
>> llvm::Constant *Protocols,
>> llvm::Constant *IvarOffsets,
>> - llvm::Constant *Properties);
>> + llvm::Constant *Properties,
>> + bool isMeta=false);
>> llvm::Constant *GenerateProtocolMethodList(
>> const llvm::SmallVectorImpl<llvm::Constant *> &MethodNames,
>> const llvm::SmallVectorImpl<llvm::Constant *> &MethodTypes);
>> @@ -817,7 +818,8 @@
>> llvm::Constant *Methods,
>> llvm::Constant *Protocols,
>> llvm::Constant *IvarOffsets,
>> - llvm::Constant *Properties) {
>> + llvm::Constant *Properties,
>> + bool isMeta) {
>> // Set up the class structure
>> // Note: Several of these are char*s when they should be ids. This is
>> // because the runtime performs this translation on load.
>> @@ -867,8 +869,8 @@
>> // Create an instance of the structure
>> // This is now an externally visible symbol, so that we can speed up class
>> // messages in the next ABI.
>> - return MakeGlobal(ClassTy, Elements, SymbolNameForClass(Name),
>> - llvm::GlobalValue::ExternalLinkage);
>> + return MakeGlobal(ClassTy, Elements, (isMeta ? "_OBJC_METACLASS_":
>> + "_OBJC_CLASS_") + std::string(Name), llvm::GlobalValue::ExternalLinkage);
>
> The static function SymbolNameForClass() is now unused. Should it be removed?
I removed it in r102497.
More information about the cfe-commits
mailing list