Index: lib/LTO/LTOCodeGenerator.cpp =================================================================== --- lib/LTO/LTOCodeGenerator.cpp +++ lib/LTO/LTOCodeGenerator.cpp @@ -134,6 +134,7 @@ Options.PositionIndependentExecutable = options.PositionIndependentExecutable; Options.EnableSegmentedStacks = options.EnableSegmentedStacks; Options.UseInitArray = options.UseInitArray; + Options.NOPInsertion = options.NOPInsertion; } void LTOCodeGenerator::setDebugInfo(lto_debug_model debug) { Index: lib/Support/RandomNumberGenerator.cpp =================================================================== --- lib/Support/RandomNumberGenerator.cpp +++ lib/Support/RandomNumberGenerator.cpp @@ -132,7 +132,7 @@ memset(Key, 0, AES_KEY_LENGTH); memset(V, 0, AES_BLOCK_SIZE); - AES_set_encrypt_key((unsigned char *)&Key, AES_KEY_LENGTH * 8, &AESKey); + AES_set_encrypt_key(Key, AES_KEY_LENGTH * 8, &AESKey); CTR_DRBG_Update(SeedMaterial); } Index: lib/Target/X86/NOPInsertion.cpp =================================================================== --- lib/Target/X86/NOPInsertion.cpp +++ lib/Target/X86/NOPInsertion.cpp @@ -100,7 +100,7 @@ int NOPCode = RandomNumberGenerator::Generator()->Random(MAX_NOPS); MachineInstr *NewMI = NULL; - unsigned reg = nopRegs[NOPCode][!!is64Bit]; + unsigned reg = nopRegs[NOPCode][is64Bit]; switch (NOPCode) { case NOP: NewMI = BuildMI(*BB, I, I->getDebugLoc(), TII->get(X86::NOOP)); Index: tools/llvm-lto/llvm-lto.cpp =================================================================== --- tools/llvm-lto/llvm-lto.cpp +++ tools/llvm-lto/llvm-lto.cpp @@ -80,6 +80,7 @@ Options.PositionIndependentExecutable = EnablePIE; Options.EnableSegmentedStacks = SegmentedStacks; Options.UseInitArray = UseInitArray; + Options.NOPInsertion = NOPInsertion; unsigned BaseArg = 0;