Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions llvm/include/llvm/Support/BinaryStreamWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define LLVM_SUPPORT_BINARYSTREAMWRITER_H

#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLForwardCompat.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/BinaryStreamArray.h"
#include "llvm/Support/BinaryStreamError.h"
Expand Down Expand Up @@ -69,8 +70,7 @@ class BinaryStreamWriter {
static_assert(std::is_enum<T>::value,
"Cannot call writeEnum with non-Enum type");

using U = std::underlying_type_t<T>;
return writeInteger<U>(static_cast<U>(Num));
return writeInteger(llvm::to_underlying(Num));
}

/// Write the unsigned integer Value to the underlying stream using ULEB128
Expand Down