AFLplusplus: Build error with old LLVM versions

Look at the xenial-arm64 Travis build: fatal error: 'llvm/IR/DebugInfo.h' file not found

#include "llvm/IR/DebugInfo.h"

Seems that with old LLVM the header is `llvm/DebugInfo.h".

Note that this header is not included in original AFL, so probably we broken the compatibility woth LLVM < 3.7. I say 3.7 cause is the first version with the header inside IR that I’ve found googling.

This needs more investigation, as a quick fix I added

#include <llvm/Config/llvm-config.h>

#include <llvm/DebugInfo.h>
#include <llvm/IR/DebugInfo.h>

But I’m not sure about the LLVM version.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

@hexcoder- for travis I set hard:


The LLVM config file lies in:


and now llvm_mode works:

A fix can be also to decide to not support these LLVM versions and fix Travis. IMO this is the most reasonable fix, @vanhauser-thc you should verify the llvm-config that Travis is using and maybe set a proper LLVM_CONFIG for LLVM 6.