[LLVMdev] emitting dwarf debug info on mach fails with assert
Eric Christopher
echristo at gmail.com
Thu Nov 1 10:29:44 PDT 2012
On Thu, Nov 1, 2012 at 6:26 AM, Carlo Kok <ck at remobjects.com> wrote:
> Compiling the IR code at http://pastebin.com/hSwdLdD0 for target triple
> x86_64-apple-macosx
> fails with :
> assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
>
> `anon'::MCMachOStreamer::EmitLabel(llvm::MCSymbol * Symbol)
> llvm::DwarfDebug::emitDebugInfo() Line 1752 + 0x3c bytes C++
> llvm::DwarfDebug::endModule() Line 865 C++
> llvm::AsmPrinter::doFinalization(llvm::Module & M) Line 878 C++
> llvm::FPPassManager::doFinalization(llvm::Module & M) Line 1536
> llvm::FPPassManager::runOnModule(llvm::Module & M) Line 1520
> llvm::MPPassManager::runOnModule(llvm::Module & M) Line 1572
> llvm::PassManagerImpl::run(llvm::Module & M) Line 1655
> llvm::PassManager::run(llvm::Module & M) Line 1685 C++
> LLVMTargetMachineEmitToFile(LLVMTargetMachine * T, LLVMOpaqueModule * M,
> char * Filename, LLVMCodeGenFileType codegen, char * * ErrorMessage) Line
> 194 C++
>
> There are two "CodeFile1.pas" files in the same IR file, however they're in
> different directories so that should be fine, from a debuggers pov.
>
> Is this something I'm doing wrong, or a bug, and if a bug, how can I help
> fix it?
>
As we discussed on IRC you'll probably want to try to define
everything in a single .o file in terms of a single compilation unit.
-eric
More information about the llvm-dev
mailing list