blob: 3f004e7a08ef8782e71ceaaa5089869ffb449161 [file] [log] [blame] [edit]
///////////////////////////////////////////////////////////////////////////////
// //
// Global.cpp //
// Copyright (C) Microsoft Corporation. All rights reserved. //
// This file is distributed under the University of Illinois Open Source //
// License. See LICENSE.TXT for details. //
// //
// //
///////////////////////////////////////////////////////////////////////////////
#include "dxc/Support/Global.h"
#include <system_error>
#include "dxc/Support/WinIncludes.h"
void CheckLLVMErrorCode(const std::error_code &ec) {
if (ec) {
DXASSERT(ec.category() == std::system_category(),
"unexpected LLVM exception code");
throw hlsl::Exception(HRESULT_FROM_WIN32(ec.value()));
}
}
static_assert(unsigned(DXC_E_OVERLAPPING_SEMANTICS) == 0x80AA0001,
"Sanity check for DXC errors failed");