pranavk / spatial-computing

This repository contains LLVM compiler passes (for now) to convert a C/C++ program to PDM (a synthesizable dataflow intermediate representation)
Apache License 2.0
5 stars 1 forks source link

compilation fails because of wrong namespace used #2

Closed pranavk closed 9 years ago

pranavk commented 9 years ago

llvm[0]: Compiling waves.cpp for Release+Asserts build (PIC) waves.cpp: In member function ‘void WaveScalar::setLabel(llvm::BasicBlock*_, unsigned int)’: waves.cpp:136:5: error: ‘llvm::Twine::Twine’ names the constructor, not the type Twine::Twine twine(k); ^ waves.cpp:136:18: error: expected ‘;’ before ‘twine’ Twine::Twine twine(k); ^ waves.cpp:136:26: error: statement cannot resolve address of overloaded function Twine::Twine twine(k); ^ waves.cpp:137:22: error: ‘twine’ was not declared in this scope (_succ)->setName(twine);

This can be easily solved by using Twine twine(k);

instead of

Twine::Twine twine(k);

because llvm/ADT/Twine.h has Twine constructor in llvm namespace, not in llvm::Twine

pranavk commented 9 years ago

commit 66b0f7cdb0317becfdd86ec33e3b80a54b03e0f8 takes care of this.

closing this.