[libclc] r210867 - prepare-builtins: Use std:: prefix for error_code

Tom Stellard tom at stellard.net
Fri Jun 13 07:21:06 PDT 2014


On Fri, Jun 13, 2014 at 09:03:42AM -0400, Rafael EspĂ­ndola wrote:
> thanks! Is there a buildbot building this?
>

I have one locally, but there is not a public one, unfortunately.

-Tom

> On 12 June 2014 21:30, Tom Stellard <thomas.stellard at amd.com> wrote:
> > Author: tstellar
> > Date: Thu Jun 12 20:30:14 2014
> > New Revision: 210867
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=210867&view=rev
> > Log:
> > prepare-builtins: Use std:: prefix for error_code
> >
> > This fixes the build with with newer LLVM.
> >
> > Modified:
> >     libclc/trunk/utils/prepare-builtins.cpp
> >
> > Modified: libclc/trunk/utils/prepare-builtins.cpp
> > URL: http://llvm.org/viewvc/llvm-project/libclc/trunk/utils/prepare-builtins.cpp?rev=210867&r1=210866&r2=210867&view=diff
> > ==============================================================================
> > --- libclc/trunk/utils/prepare-builtins.cpp (original)
> > +++ libclc/trunk/utils/prepare-builtins.cpp Thu Jun 12 20:30:14 2014
> > @@ -15,6 +15,15 @@
> >
> >  using namespace llvm;
> >
> > +#define LLVM_350_AND_NEWER \
> > +  (LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5))
> > +
> > +#if LLVM_350_AND_NEWER
> > +#define ERROR_CODE std::error_code
> > +#else
> > +#define ERROR_CODE error_code
> > +#endif
> > +
> >  static cl::opt<std::string>
> >  InputFilename(cl::Positional, cl::desc("<input bitcode>"), cl::init("-"));
> >
> > @@ -37,12 +46,12 @@ int main(int argc, char **argv) {
> >  #else
> >      OwningPtr<MemoryBuffer> BufferPtr;
> >  #endif
> > -    if (error_code ec = MemoryBuffer::getFileOrSTDIN(InputFilename, BufferPtr))
> > +    if (ERROR_CODE ec = MemoryBuffer::getFileOrSTDIN(InputFilename, BufferPtr))
> >        ErrorMessage = ec.message();
> >      else {
> >  #if LLVM_VERSION_MAJOR > 3 || (LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR > 4)
> >        ErrorOr<Module *> ModuleOrErr = parseBitcodeFile(BufferPtr.get(), Context);
> > -      if (error_code ec = ModuleOrErr.getError())
> > +      if (ERROR_CODE ec = ModuleOrErr.getError())
> >          ErrorMessage = ec.message();
> >        M.reset(ModuleOrErr.get());
> >  #else
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list