Commit 3b4e31f0 authored by Teng Qin's avatar Teng Qin

Rename exception.h to bcc_exception.h

parent eb2bce93
......@@ -23,9 +23,9 @@
#include <sstream>
#include <vector>
#include "bcc_exception.h"
#include "bcc_syms.h"
#include "bpf_module.h"
#include "exception.h"
#include "libbpf.h"
#include "perf_reader.h"
......
......@@ -21,6 +21,7 @@
#include <string>
#include "BPFTable.h"
#include "bcc_exception.h"
#include "bcc_syms.h"
#include "bpf_module.h"
#include "compat/linux/bpf.h"
......
......@@ -21,8 +21,8 @@
#include "BPFTable.h"
#include "bcc_exception.h"
#include "bcc_syms.h"
#include "exception.h"
#include "libbpf.h"
#include "perf_reader.h"
......
......@@ -23,6 +23,7 @@
#include <utility>
#include <vector>
#include "bcc_exception.h"
#include "bpf_module.h"
#include "libbpf.h"
#include "perf_reader.h"
......
......@@ -63,7 +63,7 @@ target_link_libraries(bcc-static b_frontend clang_frontend bcc-loader-static ${c
install(TARGETS bcc-shared LIBRARY COMPONENT libbcc
DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES bpf_common.h bpf_module.h bcc_syms.h exception.h libbpf.h perf_reader.h BPF.h BPFTable.h COMPONENT libbcc
install(FILES bpf_common.h bpf_module.h bcc_syms.h bcc_exception.h libbpf.h perf_reader.h BPF.h BPFTable.h COMPONENT libbcc
DESTINATION include/bcc)
install(DIRECTORY compat/linux/ COMPONENT libbcc
DESTINATION include/bcc/compat/linux
......
......@@ -29,23 +29,23 @@ namespace ebpf {
typedef std::tuple<int, std::string> StatusTuple;
template <typename... Args>
std::tuple<int, std::string> mkstatus(int ret, const char *fmt, Args... args) {
StatusTuple mkstatus(int ret, const char *fmt, Args... args) {
char buf[1024];
snprintf(buf, sizeof(buf), fmt, args...);
return std::make_tuple(ret, std::string(buf));
}
static inline std::tuple<int, std::string> mkstatus(int ret, const char *msg) {
static inline StatusTuple mkstatus(int ret, const char *msg) {
return std::make_tuple(ret, std::string(msg));
}
static inline std::tuple<int, std::string> mkstatus(
static inline StatusTuple mkstatus(
int ret, const std::string& msg
) {
return std::make_tuple(ret, msg);
}
static inline std::tuple<int, std::string> mkstatus(int ret) {
static inline StatusTuple mkstatus(int ret) {
return std::make_tuple(ret, std::string());
}
......@@ -59,7 +59,7 @@ static inline std::tuple<int, std::string> mkstatus(int ret) {
#define TRY2(CMD) \
do { \
std::tuple<int, std::string> __stp = (CMD); \
StatusTuple __stp = (CMD); \
if (std::get<0>(__stp) != 0) { \
return __stp; \
} \
......
......@@ -44,7 +44,7 @@
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
#include <llvm-c/Transforms/IPO.h>
#include "exception.h"
#include "bcc_exception.h"
#include "frontends/b/loader.h"
#include "frontends/clang/loader.h"
#include "frontends/clang/b_frontend_action.h"
......
......@@ -33,7 +33,7 @@
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include "exception.h"
#include "bcc_exception.h"
#include "codegen_llvm.h"
#include "lexer.h"
#include "table_desc.h"
......
......@@ -24,7 +24,7 @@
#include <stdint.h>
#include "common.h"
#include "exception.h"
#include "bcc_exception.h"
#include "scope.h"
#define REVISION_MASK 0xfff
......
......@@ -16,7 +16,7 @@
#include <algorithm>
#include <assert.h>
#include "exception.h"
#include "bcc_exception.h"
#include "parser.h"
#include "type_helper.h"
......
......@@ -16,7 +16,7 @@
#include "printer.h"
#include "lexer.h"
#include "exception.h"
#include "bcc_exception.h"
namespace ebpf {
namespace cc {
......
......@@ -16,7 +16,7 @@
#include <set>
#include <algorithm>
#include "exception.h"
#include "bcc_exception.h"
#include "type_check.h"
#include "lexer.h"
......
......@@ -47,7 +47,7 @@
#include <llvm/IR/Module.h>
#include "common.h"
#include "exception.h"
#include "bcc_exception.h"
#include "exported_files.h"
#include "kbuild_helper.h"
#include "b_frontend_action.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment