liberty/lib/SLAMP/SLAMP.cpp
/// FIXME: hand-roll an implementation for SLAMP___error_location because
/// __errno_location won't compile
hand-roll an implementation for SLAMP___error_location because
errno_location won't compile
hand - roll an implementation for SLAMP___error_location because errno_location won ' t compile
void SLAMP::addWrapperImplementations(Module &m) {
  LLVMContext &c = m.getContext();
  vector<Value *> args;
  auto *f0 = cast<Function>(
      m.getOrInsertFunction("SLAMP___errno_location", I32->getPointerTo())
          .getCallee());
  BasicBlock *entry = BasicBlock::Create(c, "entry", f0, nullptr);
  auto *c0 = cast<Function>(
      m.getOrInsertFunction("__errno_location", I32->getPointerTo())
          .getCallee());
  InstInsertPt pt = InstInsertPt::Beginning(entry);
  CallInst *ci = CallInst::Create(c0, "");
  pt << ci;
  pt << ReturnInst::Create(c, ci);
}
void SLAMP :: addWrapperImplementations ( Module & m ) { LLVMContext & c = m . getContext ( ) ; vector < Value * > args ; auto * f0 = cast < Function > ( m . getOrInsertFunction ( " " , I32 -> getPointerTo ( ) ) . getCallee ( ) ) ; BasicBlock * entry = BasicBlock :: Create ( c , " " , f0 , nullptr ) ; auto * c0 = cast < Function > ( m . getOrInsertFunction ( " " , I32 -> getPointerTo ( ) ) . getCallee ( ) ) ; InstInsertPt pt = InstInsertPt :: Beginning ( entry ) ; CallInst * ci = CallInst :: Create ( c0 , " " ) ; pt << ci ; pt << ReturnInst :: Create ( c , ci ) ; }
FIXME: hand-roll an implementation for SLAMP___error_location because
__errno_location won't compile
FIXME : hand - roll an implementation for SLAMP___error_location because __errno_location won ' t compile
// --- SLAMP___errno_location