Skip to content

Commit

Permalink
[llvm-objdump] Mark noreturn function as such.
Browse files Browse the repository at this point in the history
Match attribute in the header to make MSVC happy.

llvm-svn: 256560
  • Loading branch information
dcci committed Dec 29, 2015
1 parent 1daf4cb commit ed9d95b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion llvm/tools/llvm-objdump/llvm-objdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ void llvm::error(std::error_code EC) {
exit(1);
}

void llvm::report_error(StringRef File, std::error_code EC) {
LLVM_ATTRIBUTE_NORETURN void llvm::report_error(StringRef File,
std::error_code EC) {
assert(EC);
errs() << ToolName << ": '" << File << "': " << EC.message() << ".\n";
exit(1);
Expand Down
3 changes: 2 additions & 1 deletion llvm/tools/llvm-objdump/llvm-objdump.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "llvm/ADT/StringRef.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataTypes.h"

namespace llvm {
Expand Down Expand Up @@ -79,7 +80,7 @@ void PrintRelocations(const object::ObjectFile *o);
void PrintSectionHeaders(const object::ObjectFile *o);
void PrintSectionContents(const object::ObjectFile *o);
void PrintSymbolTable(const object::ObjectFile *o);
void report_error(StringRef File, std::error_code EC);
LLVM_ATTRIBUTE_NORETURN void report_error(StringRef File, std::error_code EC);

} // end namespace llvm

Expand Down

0 comments on commit ed9d95b

Please sign in to comment.