]> granicus.if.org Git - clang/commit
Add simple interface for protecting runtime functions from name
authorDaniel Dunbar <daniel@zuster.org>
Wed, 1 Oct 2008 00:49:24 +0000 (00:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 1 Oct 2008 00:49:24 +0000 (00:49 +0000)
commitf1968f28869f4e0675450ae39c478a37c5b9abd6
tree897c9408e26e67fe467db0719932983976914af9
parent60a6e0ce72a24d6247602625c631fc3dc7bfd8d4
Add simple interface for protecting runtime functions from name
collisions.
 - Provide CodeGenModule::CreateRuntimeFunction which guarantees that
   the function it creates will have the provided name in the final
   module. This allows the runtime to have its functions protected
   from declarations of the same name in the source code.

 - One could argue that this is a reason to abuse the llvm::Module
   namespace for dealing with function redeclarations. However, that
   approach seems conceptually flawed to me. This one also happens to
   be somewhat more efficient.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56899 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h