Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:Guard

536   /// Info on the global variable used to guard initialization of static locals.
539 GuardInfo() : Guard(nullptr), BitIndex(0) {}
540 llvm::GlobalVariable *Guard;
544 /// Map from DeclContext to the current guard variable. We assume that the
1722 // MSVC always uses an i32 bitfield to guard initialization, which is *not*
1734 // Get the guard variable for this function if we have one already.
1753 GI->Guard = nullptr;
1757 if (!GI->Guard) {
1758 // Mangle the name for the guard.
1766 // Create the guard variable with a zero-initializer. Just absorb linkage,
1768 GI->Guard =
1771 GI->Guard->setVisibility(GV->getVisibility());
1772 GI->Guard->setDLLStorageClass(GV->getDLLStorageClass());
1774 assert(GI->Guard->getLinkage() == GV->getLinkage() &&
1784 // Test our bit from the guard variable.
1786 llvm::LoadInst *LI = Builder.CreateLoad(GI->Guard);
1793 // Set our bit in the guard variable and emit the initializer and add a global
1796 Builder.CreateStore(Builder.CreateOr(LI, Bit), GI->Guard);