#ifdef GBE_COMPILER_AVAILABLE
#include
"llvm/Config/llvm-config.h"
#include
"llvm/IR/LLVMContext.h"
#include
"llvm/IR/Module.h"
#include
"llvm/IR/DataLayout.h"
#include
"llvm-c/Linker.h"
#include "llvm-c/BitReader.h"
#include
"llvm-c/BitWriter.h"
#include
"llvm/Transforms/Utils/Cloning.h"
#if LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 40
#include
"llvm/Bitcode/BitcodeWriter.h"
#else
#include
"llvm/Bitcode/ReaderWriter.h"
#endif
/* LLVM_VERSION_MAJOR * 10 + LLVM_VERSION_MINOR >= 40 */
#include
"llvm/Support/raw_ostream.h"
#include
"llvm/ADT/StringRef.h"
#include
"llvm/Support/MemoryBuffer.h"
#include
"llvm/Support/SourceMgr.h"
#include
"llvm/IRReader/IRReader.h"
#endif
It is strange that the issue is gone after I add println in addMacroDefinition like following code:
private
void addMacroDefinition(IIndexMacro
macro) {
try {
final
char[]
expansionImage = macro.getExpansionImage();
if (expansionImage
== null) {
// this is an
undef
System.err.println("remove:
" + String.valueOf(macro.getNameCharArray()) +
" " +
macro.getExpansion());
//System.err.println("remove: " + String.valueOf(macro.getNameCharArray()));
fMacroDictionary.remove(macro.getNameCharArray());
}
else {
If I remove " "+macro.getExpansion(), the issue come back.