Merge changes I8f3fb7ae,I74eb7cb0,I18a1f974 into pi-dev

* changes:
  header-abi-dumper: Add omp.h workaround
  header-abi-dumper: Refactor argv fixes
  Add information to denote whether a function parameter is 'this'.
This commit is contained in:
Logan Chien
2018-04-17 01:30:10 +00:00
committed by Android (Google) Code Review
14 changed files with 568 additions and 21 deletions

View File

@@ -486,18 +486,19 @@ bool FunctionDeclWrapper::SetupThisParameter(abi_util::FunctionIR *functionp,
return true;
}
clang::QualType this_type = cxx_method_decl->getThisType(*ast_contextp_);
return SetupFunctionParameter(functionp, this_type, false, source_file);
return SetupFunctionParameter(functionp, this_type, false, source_file, true);
}
bool ABIWrapper::SetupFunctionParameter(
abi_util::CFunctionLikeIR *functionp, const clang::QualType qual_type,
bool has_default_arg, const std::string &source_file) {
bool has_default_arg, const std::string &source_file, bool is_this_ptr) {
if (!CreateBasicNamedAndTypedDecl(qual_type, source_file)) {
llvm::errs() << "Setting up function parameter failed\n";
return false;
}
functionp->AddParameter(abi_util::ParamIR(
ast_caches_->GetTypeId(GetKeyForTypeId(qual_type)), has_default_arg));
ast_caches_->GetTypeId(GetKeyForTypeId(qual_type)), has_default_arg,
is_this_ptr));
return true;
}

View File

@@ -63,7 +63,8 @@ class ABIWrapper {
bool SetupFunctionParameter(abi_util::CFunctionLikeIR *functionp,
const clang::QualType qual_type,
bool has_default_arg,
const std::string &source_file);
const std::string &source_file,
bool is_this_parameter = false);
std::string QualTypeToString(const clang::QualType &sweet_qt);

View File

@@ -0,0 +1,17 @@
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "fixed_argv.h"
FixedArgvRegistry *FixedArgvRegistry::head_ = nullptr;

View File

@@ -0,0 +1,134 @@
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef FIXED_ARGV_H_
#define FIXED_ARGV_H_
#include <array>
#include <tuple>
#include <utility>
#include <vector>
#include <assert.h>
#include <string.h>
class FixedArgvAccess;
class FixedArgv {
friend FixedArgvAccess;
private:
std::vector<const char *> argv_;
public:
FixedArgv(int argc, const char **argv) : argv_(argv, argv + argc) {}
int GetArgc() const {
return argv_.size();
}
const char *const *GetArgv() const {
return argv_.data();
}
void Resize(int argc) {
assert(argc <= argv_.size());
argv_.resize(argc);
}
template <typename... T>
const char *GetLastArg(T&& ...options) const {
std::array<const char *, sizeof...(options)> opts{
std::forward<T&&>(options)...};
for (std::vector<const char *>::const_reverse_iterator it = argv_.rbegin(),
end = argv_.rend(); it != end; ++it) {
for (const char *opt : opts) {
if (::strcmp(*it, opt) == 0) {
return opt;
}
}
}
return nullptr;
}
template <typename... T>
bool IsLastArgEqualFirstOption(const char *expected, T&& ...others) const {
const char *last = GetLastArg(expected, others...);
// Since GetLastArg() returns the address in {expected, others...}, pointer
// comparison is sufficient.
return last == expected;
}
template<typename... T>
void PushForwardArgs(T&& ...arguments) {
std::array<const char *, sizeof...(arguments)> args{
std::forward<T&&>(arguments)...};
if (!GetLastArg("--")) {
argv_.push_back("--");
}
argv_.insert(argv_.end(), args.begin(), args.end());
}
};
class FixedArgvAccess {
private:
FixedArgv &fixed_argv_;
public:
int argc_;
const char **argv_;
public:
explicit FixedArgvAccess(FixedArgv &fixed_argv)
: fixed_argv_(fixed_argv), argc_(fixed_argv.GetArgc()),
argv_(fixed_argv.argv_.data()) {
}
~FixedArgvAccess() {
fixed_argv_.Resize(argc_);
}
private:
FixedArgvAccess(const FixedArgvAccess &) = delete;
FixedArgvAccess& operator=(const FixedArgvAccess &rhs) = delete;
};
class FixedArgvRegistry {
public:
typedef void (Function)(FixedArgv &);
private:
static FixedArgvRegistry *head_;
Function *func_;
FixedArgvRegistry *next_;
public:
FixedArgvRegistry(Function *func) : func_(func), next_(head_) {
head_ = this;
}
static void Apply(FixedArgv &fixed_argv) {
for (FixedArgvRegistry *ptr = head_; ptr; ptr = ptr->next_) {
ptr->func_(fixed_argv);
}
}
};
#endif // FIXED_ARGV_H_

View File

@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "fixed_argv.h"
#include "frontend_action_factory.h"
#include <header_abi_util.h>
#include <clang/Frontend/FrontendActions.h>
@@ -71,26 +73,29 @@ static void HideIrrelevantCommandLineOptions() {
}
}
int main(int argc, const char **argv) {
HideIrrelevantCommandLineOptions();
// FIXME: Clang FORTIFY requires a version of clang at least as new as
// clang-3688880 (r285906). Since external/clang is currently r275480, we need
// to disable FORTIFY for this tool to function correctly.
std::vector<const char *> fixedArgv(argv, argv + argc);
fixedArgv.push_back("-U_FORTIFY_SOURCE");
int fixedArgc = fixedArgv.size();
// Tweak argc and argv to workaround clang version mismatches.
FixedArgv fixed_argv(argc, argv);
FixedArgvRegistry::Apply(fixed_argv);
// Create compilation database from command line arguments after "--".
std::unique_ptr<clang::tooling::CompilationDatabase> compilations(
clang::tooling::FixedCompilationDatabase::loadFromCommandLine(
fixedArgc, fixedArgv.data()));
std::unique_ptr<clang::tooling::CompilationDatabase> compilations;
{
// loadFromCommandLine() may alter argc and argv, thus access fixed_argv
// through FixedArgvAccess.
FixedArgvAccess raw(fixed_argv);
compilations.reset(
clang::tooling::FixedCompilationDatabase::loadFromCommandLine(
raw.argc_, raw.argv_));
}
// Parse the command line options.
// Note that loadFromCommandLine may alter fixedArgc, so we can't use
// fixedArgv.size() here.
llvm::cl::ParseCommandLineOptions(fixedArgc, fixedArgv.data(),
"header-checker");
llvm::cl::ParseCommandLineOptions(
fixed_argv.GetArgc(), fixed_argv.GetArgv(), "header-checker");
// Input header file existential check.
if (!llvm::sys::fs::exists(header_file)) {

View File

@@ -0,0 +1,221 @@
#ifndef OMP_HEADER_DATA_H_
#define OMP_HEADER_DATA_H_
const char OMP_HEADER_DATA[] = R"__SOURCE__(
/*
* include/50/omp.h.var
*/
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.txt for details.
//
//===----------------------------------------------------------------------===//
#ifndef __OMP_H
# define __OMP_H
# define KMP_VERSION_MAJOR 5
# define KMP_VERSION_MINOR 0
# define KMP_VERSION_BUILD 20140926
# define KMP_BUILD_DATE "No_Timestamp"
# ifdef __cplusplus
extern "C" {
# endif
# if defined(_WIN32)
# define __KAI_KMPC_CONVENTION __cdecl
# else
# define __KAI_KMPC_CONVENTION
# endif
/* schedule kind constants */
typedef enum omp_sched_t {
omp_sched_static = 1,
omp_sched_dynamic = 2,
omp_sched_guided = 3,
omp_sched_auto = 4
} omp_sched_t;
/* set API functions */
extern void __KAI_KMPC_CONVENTION omp_set_num_threads (int);
extern void __KAI_KMPC_CONVENTION omp_set_dynamic (int);
extern void __KAI_KMPC_CONVENTION omp_set_nested (int);
extern void __KAI_KMPC_CONVENTION omp_set_max_active_levels (int);
extern void __KAI_KMPC_CONVENTION omp_set_schedule (omp_sched_t, int);
/* query API functions */
extern int __KAI_KMPC_CONVENTION omp_get_num_threads (void);
extern int __KAI_KMPC_CONVENTION omp_get_dynamic (void);
extern int __KAI_KMPC_CONVENTION omp_get_nested (void);
extern int __KAI_KMPC_CONVENTION omp_get_max_threads (void);
extern int __KAI_KMPC_CONVENTION omp_get_thread_num (void);
extern int __KAI_KMPC_CONVENTION omp_get_num_procs (void);
extern int __KAI_KMPC_CONVENTION omp_in_parallel (void);
extern int __KAI_KMPC_CONVENTION omp_in_final (void);
extern int __KAI_KMPC_CONVENTION omp_get_active_level (void);
extern int __KAI_KMPC_CONVENTION omp_get_level (void);
extern int __KAI_KMPC_CONVENTION omp_get_ancestor_thread_num (int);
extern int __KAI_KMPC_CONVENTION omp_get_team_size (int);
extern int __KAI_KMPC_CONVENTION omp_get_thread_limit (void);
extern int __KAI_KMPC_CONVENTION omp_get_max_active_levels (void);
extern void __KAI_KMPC_CONVENTION omp_get_schedule (omp_sched_t *, int *);
extern int __KAI_KMPC_CONVENTION omp_get_max_task_priority (void);
/* lock API functions */
typedef struct omp_lock_t {
void * _lk;
} omp_lock_t;
extern void __KAI_KMPC_CONVENTION omp_init_lock (omp_lock_t *);
extern void __KAI_KMPC_CONVENTION omp_set_lock (omp_lock_t *);
extern void __KAI_KMPC_CONVENTION omp_unset_lock (omp_lock_t *);
extern void __KAI_KMPC_CONVENTION omp_destroy_lock (omp_lock_t *);
extern int __KAI_KMPC_CONVENTION omp_test_lock (omp_lock_t *);
/* nested lock API functions */
typedef struct omp_nest_lock_t {
void * _lk;
} omp_nest_lock_t;
extern void __KAI_KMPC_CONVENTION omp_init_nest_lock (omp_nest_lock_t *);
extern void __KAI_KMPC_CONVENTION omp_set_nest_lock (omp_nest_lock_t *);
extern void __KAI_KMPC_CONVENTION omp_unset_nest_lock (omp_nest_lock_t *);
extern void __KAI_KMPC_CONVENTION omp_destroy_nest_lock (omp_nest_lock_t *);
extern int __KAI_KMPC_CONVENTION omp_test_nest_lock (omp_nest_lock_t *);
/* lock hint type for dynamic user lock */
typedef enum omp_lock_hint_t {
omp_lock_hint_none = 0,
omp_lock_hint_uncontended = 1,
omp_lock_hint_contended = (1<<1 ),
omp_lock_hint_nonspeculative = (1<<2 ),
omp_lock_hint_speculative = (1<<3 ),
kmp_lock_hint_hle = (1<<16),
kmp_lock_hint_rtm = (1<<17),
kmp_lock_hint_adaptive = (1<<18)
} omp_lock_hint_t;
/* hinted lock initializers */
extern void __KAI_KMPC_CONVENTION omp_init_lock_with_hint(omp_lock_t *, omp_lock_hint_t);
extern void __KAI_KMPC_CONVENTION omp_init_nest_lock_with_hint(omp_nest_lock_t *, omp_lock_hint_t);
/* time API functions */
extern double __KAI_KMPC_CONVENTION omp_get_wtime (void);
extern double __KAI_KMPC_CONVENTION omp_get_wtick (void);
/* OpenMP 4.0 */
extern int __KAI_KMPC_CONVENTION omp_get_default_device (void);
extern void __KAI_KMPC_CONVENTION omp_set_default_device (int);
extern int __KAI_KMPC_CONVENTION omp_is_initial_device (void);
extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void);
extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void);
extern int __KAI_KMPC_CONVENTION omp_get_team_num (void);
extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void);
# include <stdlib.h>
/* OpenMP 4.5 */
extern int __KAI_KMPC_CONVENTION omp_get_initial_device (void);
extern void* __KAI_KMPC_CONVENTION omp_target_alloc(size_t, int);
extern void __KAI_KMPC_CONVENTION omp_target_free(void *, int);
extern int __KAI_KMPC_CONVENTION omp_target_is_present(void *, int);
extern int __KAI_KMPC_CONVENTION omp_target_memcpy(void *, void *, size_t, size_t, size_t, int, int);
extern int __KAI_KMPC_CONVENTION omp_target_memcpy_rect(void *, void *, size_t, int, const size_t *,
const size_t *, const size_t *, const size_t *, const size_t *, int, int);
extern int __KAI_KMPC_CONVENTION omp_target_associate_ptr(void *, void *, size_t, size_t, int);
extern int __KAI_KMPC_CONVENTION omp_target_disassociate_ptr(void *, int);
/* kmp API functions */
extern int __KAI_KMPC_CONVENTION kmp_get_stacksize (void);
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize (int);
extern size_t __KAI_KMPC_CONVENTION kmp_get_stacksize_s (void);
extern void __KAI_KMPC_CONVENTION kmp_set_stacksize_s (size_t);
extern int __KAI_KMPC_CONVENTION kmp_get_blocktime (void);
extern int __KAI_KMPC_CONVENTION kmp_get_library (void);
extern void __KAI_KMPC_CONVENTION kmp_set_blocktime (int);
extern void __KAI_KMPC_CONVENTION kmp_set_library (int);
extern void __KAI_KMPC_CONVENTION kmp_set_library_serial (void);
extern void __KAI_KMPC_CONVENTION kmp_set_library_turnaround (void);
extern void __KAI_KMPC_CONVENTION kmp_set_library_throughput (void);
extern void __KAI_KMPC_CONVENTION kmp_set_defaults (char const *);
extern void __KAI_KMPC_CONVENTION kmp_set_disp_num_buffers (int);
/* Intel affinity API */
typedef void * kmp_affinity_mask_t;
extern int __KAI_KMPC_CONVENTION kmp_set_affinity (kmp_affinity_mask_t *);
extern int __KAI_KMPC_CONVENTION kmp_get_affinity (kmp_affinity_mask_t *);
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_max_proc (void);
extern void __KAI_KMPC_CONVENTION kmp_create_affinity_mask (kmp_affinity_mask_t *);
extern void __KAI_KMPC_CONVENTION kmp_destroy_affinity_mask (kmp_affinity_mask_t *);
extern int __KAI_KMPC_CONVENTION kmp_set_affinity_mask_proc (int, kmp_affinity_mask_t *);
extern int __KAI_KMPC_CONVENTION kmp_unset_affinity_mask_proc (int, kmp_affinity_mask_t *);
extern int __KAI_KMPC_CONVENTION kmp_get_affinity_mask_proc (int, kmp_affinity_mask_t *);
/* OpenMP 4.0 affinity API */
typedef enum omp_proc_bind_t {
omp_proc_bind_false = 0,
omp_proc_bind_true = 1,
omp_proc_bind_master = 2,
omp_proc_bind_close = 3,
omp_proc_bind_spread = 4
} omp_proc_bind_t;
extern omp_proc_bind_t __KAI_KMPC_CONVENTION omp_get_proc_bind (void);
/* OpenMP 4.5 affinity API */
extern int __KAI_KMPC_CONVENTION omp_get_num_places (void);
extern int __KAI_KMPC_CONVENTION omp_get_place_num_procs (int);
extern void __KAI_KMPC_CONVENTION omp_get_place_proc_ids (int, int *);
extern int __KAI_KMPC_CONVENTION omp_get_place_num (void);
extern int __KAI_KMPC_CONVENTION omp_get_partition_num_places (void);
extern void __KAI_KMPC_CONVENTION omp_get_partition_place_nums (int *);
extern void * __KAI_KMPC_CONVENTION kmp_malloc (size_t);
extern void * __KAI_KMPC_CONVENTION kmp_aligned_malloc (size_t, size_t);
extern void * __KAI_KMPC_CONVENTION kmp_calloc (size_t, size_t);
extern void * __KAI_KMPC_CONVENTION kmp_realloc (void *, size_t);
extern void __KAI_KMPC_CONVENTION kmp_free (void *);
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
/* OpenMP 5.0 Tool Control */
typedef enum omp_control_tool_result_t {
omp_control_tool_notool = -2,
omp_control_tool_nocallback = -1,
omp_control_tool_success = 0,
omp_control_tool_ignored = 1
} omp_control_tool_result_t;
typedef enum omp_control_tool_t {
omp_control_tool_start = 1,
omp_control_tool_pause = 2,
omp_control_tool_flush = 3,
omp_control_tool_end = 4
} omp_control_tool_t;
extern int __KAI_KMPC_CONVENTION omp_control_tool(int, int, void*);
# undef __KAI_KMPC_CONVENTION
/* Warning:
The following typedefs are not standard, deprecated and will be removed in a future release.
*/
typedef int omp_int_t;
typedef double omp_wtime_t;
# ifdef __cplusplus
}
# endif
#endif /* __OMP_H */
)__SOURCE__";
#endif // OMP_HEADER_DATA_H_

View File

@@ -0,0 +1,24 @@
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "fixed_argv.h"
static void DisableFortifySource(FixedArgv &fixed_argv) {
// FIXME: Clang FORTIFY requires a version of clang at least as new as
// clang-3688880 (r285906). Since external/clang is currently r275480, we need
// to disable FORTIFY for this tool to function correctly.
fixed_argv.PushForwardArgs("-U_FORTIFY_SOURCE");
}
static FixedArgvRegistry X(DisableFortifySource);

View File

@@ -0,0 +1,90 @@
// Copyright (C) 2018 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "fixed_argv.h"
#include "omp_header_data.h"
#include <llvm/ADT/SmallString.h>
#include <llvm/Support/FileSystem.h>
#include <llvm/Support/Path.h>
#include <fstream>
#include <string>
#include <system_error>
#include <stdlib.h>
static std::string openmp_include_dir;
static void RemoveOpenMPIncludeDir() {
if (openmp_include_dir.empty()) {
return;
}
// Remove the <omp.h> header file.
llvm::SmallString<64> path;
llvm::sys::path::append(path, openmp_include_dir, "omp.h");
llvm::sys::fs::remove(llvm::Twine(path));
// Remove the directory.
llvm::sys::fs::remove(llvm::Twine(openmp_include_dir));
}
static std::error_code WriteFile(const char *path, const char *data,
size_t size) {
std::fstream output(path, std::ios_base::out | std::ios_base::trunc);
if (!output) {
return std::make_error_code(std::io_errc::stream);
}
output.write(data, size);
if (!output) {
return std::make_error_code(std::io_errc::stream);
}
return std::error_code();
}
static std::error_code CreateOpenMPIncludeDir() {
llvm::SmallString<64> path;
// Create a temporary directory for include fixes.
std::error_code error_code =
llvm::sys::fs::createUniqueDirectory("header-abi-dump-include", path);
if (error_code) {
return error_code;
}
openmp_include_dir = path.str();
// Register a directory cleanup callback.
::atexit(RemoveOpenMPIncludeDir);
// Create <omp.h> and write the content.
llvm::sys::path::append(path, "omp.h");
return WriteFile(path.c_str(), OMP_HEADER_DATA, sizeof(OMP_HEADER_DATA) - 1);
}
static void SetupOpenMPIncludeDir(FixedArgv &fixed_argv) {
// FIXME: clang-3289846 does not have <omp.h>. This workaround copies omp.h
// from LLVM 5.0+ and adds `-isystem` to header search paths.
if (fixed_argv.IsLastArgEqualFirstOption("-fopenmp", "-fno-openmp")) {
std::error_code ec = CreateOpenMPIncludeDir();
if (!ec) {
fixed_argv.PushForwardArgs("-isystem", openmp_include_dir.c_str());
}
}
}
static FixedArgvRegistry X(SetupOpenMPIncludeDir);

View File

@@ -608,15 +608,21 @@ class GlobalVarIR: public LinkableMessageIR , public ReferencesOtherType {
class ParamIR : public ReferencesOtherType {
public:
ParamIR(const std::string &type, bool is_default) :
ReferencesOtherType(type) , is_default_(is_default) {}
ParamIR(const std::string &type, bool is_default, bool is_this_ptr) :
ReferencesOtherType(type) , is_default_(is_default),
is_this_ptr_(is_this_ptr) {}
bool GetIsDefault() const {
return is_default_;
}
bool GetIsThisPtr() const {
return is_this_ptr_;
}
protected:
bool is_default_ = false;
bool is_this_ptr_ = false;
};
class CFunctionLikeIR {

View File

@@ -87,7 +87,8 @@ static void SetupCFunctionLikeIR(const T &cfunction_like_protobuf,
CFunctionLikeIR *cfunction_like_ir) {
cfunction_like_ir->SetReturnType(cfunction_like_protobuf.return_type());
for (auto &&parameter: cfunction_like_protobuf.parameters()) {
ParamIR param_ir(parameter.referenced_type(), parameter.default_arg());
ParamIR param_ir(parameter.referenced_type(), parameter.default_arg(),
false);
cfunction_like_ir->AddParameter(std::move(param_ir));
}
}
@@ -102,7 +103,8 @@ FunctionIR ProtobufTextFormatToIRReader::FunctionProtobufToIR(
function_ir.SetSourceFile(function_protobuf.source_file());
// Set parameters
for (auto &&parameter: function_protobuf.parameters()) {
ParamIR param_ir(parameter.referenced_type(), parameter.default_arg());
ParamIR param_ir(parameter.referenced_type(), parameter.default_arg(),
parameter.is_this_ptr());
function_ir.AddParameter(std::move(param_ir));
}
// Set Template info
@@ -570,6 +572,7 @@ bool IRToProtobufConverter::AddFunctionParameters(
added_parameter->set_referenced_type(
parameter.GetReferencedType());
added_parameter->set_default_arg(parameter.GetIsDefault());
added_parameter->set_is_this_ptr(parameter.GetIsThisPtr());
}
return true;
}

View File

@@ -74,6 +74,7 @@ message FunctionDecl {
message ParamDecl {
optional string referenced_type = 1;
optional bool default_arg = 2;
optional bool is_this_ptr = 3;
}
message RecordFieldDecl {

View File

@@ -802,6 +802,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD2Ev"
access: public_access
@@ -813,6 +814,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD1Ev"
access: public_access
@@ -824,6 +826,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD0Ev"
access: public_access
@@ -835,6 +838,7 @@ functions {
parameters {
referenced_type: "type-3"
default_arg: true
is_this_ptr: false
}
linker_set_key: "_ZN5test33EndEf"
access: public_access
@@ -846,6 +850,7 @@ functions {
parameters {
referenced_type: "type-26"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN8CPPHello5againEv"
access: public_access
@@ -857,6 +862,7 @@ functions {
parameters {
referenced_type: "type-26"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN8CPPHelloC2Ev"
access: public_access
@@ -868,6 +874,7 @@ functions {
parameters {
referenced_type: "type-26"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN8CPPHelloC1Ev"
access: public_access
@@ -879,6 +886,7 @@ functions {
parameters {
referenced_type: "type-26"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN8CPPHello9test_enumEv"
access: public_access
@@ -890,14 +898,17 @@ functions {
parameters {
referenced_type: "type-28"
default_arg: false
is_this_ptr: false
}
parameters {
referenced_type: "type-29"
default_arg: false
is_this_ptr: false
}
parameters {
referenced_type: "type-30"
default_arg: false
is_this_ptr: false
}
linker_set_key: "_Z3boo8CPPHelloPiPf"
access: public_access
@@ -909,10 +920,12 @@ functions {
parameters {
referenced_type: "type-33"
default_arg: false
is_this_ptr: true
}
parameters {
referenced_type: "type-34"
default_arg: false
is_this_ptr: false
}
linker_set_key: "_ZN4ListIfE5_NodeC2ERKf"
access: public_access
@@ -924,10 +937,12 @@ functions {
parameters {
referenced_type: "type-33"
default_arg: false
is_this_ptr: true
}
parameters {
referenced_type: "type-34"
default_arg: false
is_this_ptr: false
}
linker_set_key: "_ZN4ListIfE5_NodeC1ERKf"
access: public_access
@@ -939,6 +954,7 @@ functions {
parameters {
referenced_type: "type-33"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN4ListIfE5_NodeD2Ev"
access: public_access
@@ -950,6 +966,7 @@ functions {
parameters {
referenced_type: "type-33"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN4ListIfE5_NodeD1Ev"
access: public_access
@@ -961,14 +978,17 @@ functions {
parameters {
referenced_type: "type-31"
default_arg: false
is_this_ptr: false
}
parameters {
referenced_type: "type-39"
default_arg: false
is_this_ptr: false
}
parameters {
referenced_type: "type-12"
default_arg: false
is_this_ptr: false
}
template_info {
elements {

View File

@@ -802,6 +802,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD2Ev"
access: public_access
@@ -813,6 +814,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD1Ev"
access: public_access
@@ -824,6 +826,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD0Ev"
access: public_access
@@ -835,6 +838,7 @@ functions {
parameters {
referenced_type: "type-3"
default_arg: true
is_this_ptr: false
}
linker_set_key: "_ZN5test33EndEf"
access: public_access
@@ -846,6 +850,7 @@ functions {
parameters {
referenced_type: "type-26"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN8CPPHello5againEv"
access: public_access
@@ -857,6 +862,7 @@ functions {
parameters {
referenced_type: "type-26"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN8CPPHelloC2Ev"
access: public_access
@@ -868,6 +874,7 @@ functions {
parameters {
referenced_type: "type-26"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN8CPPHelloC1Ev"
access: public_access
@@ -879,6 +886,7 @@ functions {
parameters {
referenced_type: "type-26"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN8CPPHello9test_enumEv"
access: public_access
@@ -890,14 +898,17 @@ functions {
parameters {
referenced_type: "type-28"
default_arg: false
is_this_ptr: false
}
parameters {
referenced_type: "type-29"
default_arg: false
is_this_ptr: false
}
parameters {
referenced_type: "type-30"
default_arg: false
is_this_ptr: false
}
linker_set_key: "_Z3boo8CPPHelloPiPf"
access: public_access
@@ -909,10 +920,12 @@ functions {
parameters {
referenced_type: "type-33"
default_arg: false
is_this_ptr: true
}
parameters {
referenced_type: "type-34"
default_arg: false
is_this_ptr: false
}
linker_set_key: "_ZN4ListIfE5_NodeC2ERKf"
access: public_access
@@ -924,10 +937,12 @@ functions {
parameters {
referenced_type: "type-33"
default_arg: false
is_this_ptr: true
}
parameters {
referenced_type: "type-34"
default_arg: false
is_this_ptr: false
}
linker_set_key: "_ZN4ListIfE5_NodeC1ERKf"
access: public_access
@@ -939,6 +954,7 @@ functions {
parameters {
referenced_type: "type-33"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN4ListIfE5_NodeD2Ev"
access: public_access
@@ -950,6 +966,7 @@ functions {
parameters {
referenced_type: "type-33"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN4ListIfE5_NodeD1Ev"
access: public_access
@@ -961,14 +978,17 @@ functions {
parameters {
referenced_type: "type-31"
default_arg: false
is_this_ptr: false
}
parameters {
referenced_type: "type-39"
default_arg: false
is_this_ptr: false
}
parameters {
referenced_type: "type-12"
default_arg: false
is_this_ptr: false
}
template_info {
elements {

View File

@@ -360,6 +360,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD2Ev"
access: public_access
@@ -371,6 +372,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD1Ev"
access: public_access
@@ -382,6 +384,7 @@ functions {
parameters {
referenced_type: "type-7"
default_arg: false
is_this_ptr: true
}
linker_set_key: "_ZN5test210HelloAgainD0Ev"
access: public_access
@@ -393,6 +396,7 @@ functions {
parameters {
referenced_type: "type-3"
default_arg: true
is_this_ptr: false
}
linker_set_key: "_ZN5test33EndEf"
access: public_access